-
Notifications
You must be signed in to change notification settings - Fork 970
Conversation
875a707
to
5071c58
Compare
5071c58
to
7ecfc26
Compare
7ecfc26
to
9ffc7ee
Compare
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.
@ayumi can you please rebase this? I promise to review after that 😄
9ffc7ee
to
34c42e3
Compare
@bsclifton thanks for the reminder! I rebased and tried it out again on Linux (dev and built package) |
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.
++ confirmed the perf gains
has this dep passed through sec audit? if so lgtm
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.
++
Security review created https://github.com/brave/internal/issues/161 Will wait for results before merging |
i wonder if we will run into cache invalidation issues? bahmutov/cache-require-paths#6 |
sorry, accidental close |
@ayumi do you know if the cache is invalidated at any point during each run? If not, we could encounter the problem @diracdeltas linked to when running from source (we wouldn't run into it for packaged builds though)
|
@diracdeltas @bsclifton That's a good catch. The only cache invalidation happens when the requiring a cached path fails, in that case it resolves from scratch: https://github.com/bahmutov/cache-require-paths/blob/master/index.js#L40 So it sounds like this may affect dev builds, however wouldn't affect packaged builds. |
@ayumi I think that would be perfect actually 😄 👍 |
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.
Let's go with the invalidating using the install npm hook 😄
pushing back a few releases - @ayumi we can re-review once the hook is done (per notes above) 😄 |
Closing PR for now- let's reopen if we have the time to revisit 😄 |
Add cache-require-paths.
The first start is slightly slower (maybe due to writing the cache) but subsequent starts are faster.
Test plan:
Measuring perf
a. To L10 add:
b. To L361 after
ready = true
add:Note: when switching branches delete node_modules and reinstall to be sure the npm dedupe changes got applied
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests