Skip to content

Implement Lazy Autoloading to Speed Up Boot Time for Sorcery #348

@jonmchan

Description

@jonmchan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    implemented in v1This issue or pull request has been resolved in the v1 rework codebase

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions