-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add framework for preloading controllers #1614
Conversation
2a34a7e
to
f07c7fe
Compare
For what it's worth, I read through this commit, and it looks good to me. |
I like this approach especially as it can be easily configured to avoid preloading if someone was so inclined (e.g. CGI deployment). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No objections from me. Surprised that this new functionality wasn't a bigger change.
One question as an after-thought: why default to |
When i say |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a great addition to mojo. 👍
Summary
This is a less ambitious solution for #1607. It doesn't preload all possible controllers but leaves it up to the developer to configure the right namespaces. The default of
MyApp::Controller
might just work for most of our users though.Motivation
More efficient memory usage. Detecting syntax errors in controllers much earlier (during application startup instead of at runtime).
References
#1607