sorcery
sorcery copied to clipboard
Implement Lazy Autoloading to Speed Up Boot Time for Sorcery
Configuration
- Sorcery Version:
0.16.5
- Ruby Version:
3.1.2
- Framework:
Rails 6.1.6
- Platform:
MacOS
Sorcery does not have any lazy loading - everything is always loaded when the gem is included, including test helpers, submodules that may or may not be used, and protocols that is not necessary.
If we take a look at the load times using a tool like bumbler (gem install bumbler
bumbler --all
), we see that sorcery takes almost as long to load as rails:
$ bumbler --all
...
844.13 sorcery
922.26 rails
I believe load times can be improved if we consider using autoloading like zeitwerk.