Recompilation speedup: move as_local_public/0 into ActivityPub.Utils
In order to use the data in Pleroma.Constants
, files must require Pleroma.Constants
. However,
-
require
creates a compile-time dep -
as_local_public/0
has a dep onPleroma.Web
- As a result, files that
require Pleroma.Constants
have a compile-time dep onPleroma.Web
Even though other AP IDs are in this file, I argue that as_local_public
is not really a constant since it can change based on the user's configuration. So I think a more appropriate place for it is in ActivityPub.Utils
.
This change reduces the length of all existing cycles by 1: https://www.diffchecker.com/jQbwM3G4