Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Make requires lazy to improve startup times #123

Merged
merged 1 commit into from
Jun 23, 2016

Conversation

trentmwillis
Copy link
Member

@trentmwillis trentmwillis commented Jun 22, 2016

Addressing #122. Added some simple caching as well, not sure if it's beneficial or not. These changes seem to cut startup times by about 50% on average.

cc @stefanpenner

@@ -48,8 +46,27 @@ module.exports = {
return path.join(__dirname, 'blueprints');
},

require: function(name) {
if (!requireCache) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some simple caching as well, not sure if it's beneficial or not

require caches by default, no need to do manual caching.

Copy link
Member Author

@trentmwillis trentmwillis Jun 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL...will update

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trentmwillis
Copy link
Member Author

@rwjblue updated

@stefanpenner
Copy link
Contributor

:shipit:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants