Skip to content

Recompilation speedup: Ignore runtime deps in Pleroma.Config.Loader with Module.concat/1

Alex Gleason requested to merge cycles-config-loader-redux into develop

#2651 (closed)

In !3424 (merged) I changed @reject_keys on Config.Loader to runtime deps, but that wasn't enough. I've been putting off this MR because I wanted to see if my other changes would fix it, but it doesn't seem like it.

Having Config depend on Endpoint, even as a runtime dep, is not ideal because is creates cycles. And a lot of stuff has a compile-dep on Config.

Since @reject_keys is just checking the keys for equality (with ==, literally), it's okay to let the compiler ignore them with Module.concat/1. This is the way the Elixir team recommends you do it, if necessary.

This change cuts down a cycle and shrinks the rest: https://www.diffchecker.com/n9Jf8Sln

Screenshot_from_2021-06-08_16-14-15

Merge request reports