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

performance: cache existsSync results in PackageCache.ownerOfFile #3

Closed
wants to merge 1 commit into from

Conversation

raycohen
Copy link
Owner

Similar to embroider-build#1608

A lot of time is being spent in PackageCache#ownerOfFile and a good chunk of that is from the calls to existsSync:

Before:
Screenshot 2023-09-25 at 11 17 06 PM

By caching access, the amount of time in existsSync drops considerably, From ~12 seconds to under 500ms.

After:
Screenshot 2023-09-25 at 11 17 18 PM

Even so, this path is still so hot that there's a good deal of time in ownerOfFile and the new getCachedExistsSync methods that isn't accounted for by existsSync. There's probably more that can be done here.

@mansona
Copy link

mansona commented Sep 26, 2023

Did you intend to target upstream embroider with this PR rather than your fork?

@raycohen
Copy link
Owner Author

raycohen commented Sep 26, 2023 via email

@raycohen raycohen closed this Sep 26, 2023
@raycohen
Copy link
Owner Author

embroider-build#1612

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

Successfully merging this pull request may close these issues.

2 participants