Skip to content

Recompilation speedup: create MRF.Policy behaviour separate from MRF module

Alex Gleason requested to merge cycles-mrf-policy into develop

#2651 (closed)

@behaviour creates a compile-time dep, and it turns out it's bad for recompilation to put anything inside a behaviour file except callbacks and typespecs.

Pleroma.Web.ActivityPub.MRF was serving as both a behaviour and a place for utility functions.

MRF is a framework. A policy is one part of that framework. So I let MRF keep the functions, and I moved the behaviour to MRF.Policy. Now MRF policies implement that behaviour.

This is a better way to fix the cycles in !3433 (closed). It gets rid of a cycle and shrinks others: https://www.diffchecker.com/ecOTOEBb

Screenshot_from_2021-06-07_14-32-06

Merge request reports