★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/28012Nouvelle recherche | Portail wanayoo
Skip to content
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

src: only run preloadModules if the preload array is not empty #28012

Closed

Conversation

Copy link
Member

@MarshallOfSound MarshallOfSound commented Jun 2, 2019

Noticed this while doing some performance work on Electrons start-up time, it looks like the getOptionValue call here always returns a truthy value even when it is an empty array. When it's empty we can shortcut a require call here saving a few ms 👍

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Jun 2, 2019

Trott
Trott approved these changes Jun 2, 2019
@ZYSzys ZYSzys added the author ready label Jun 2, 2019
@antsmartian
Copy link
Contributor

@antsmartian antsmartian commented Jun 9, 2019

Landed in 97a4246 🎉 🎉

@antsmartian antsmartian closed this Jun 9, 2019
antsmartian pushed a commit that referenced this issue Jun 9, 2019
PR-URL: #28012
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
BridgeAR pushed a commit that referenced this issue Jun 17, 2019
PR-URL: #28012
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@BridgeAR BridgeAR mentioned this pull request Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet