-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fixes performance regression on pnpm installs #6760
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
Conversation
This reverts commit 994888e.
@@ -196,7 +184,7 @@ export class LibZipImpl implements ZipImpl { | |||
const memory = this.libzip.HEAPU8.subarray(buffer, buffer + size); | |||
const data = Buffer.from(memory); | |||
|
|||
return {data, compressionMethod}; | |||
return {data, compressionMethod, shouldBeCached: true}; |
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'd prefer shouldBeCached
to be a class property than something returned by getFileSource
, especially since it never changes (and probably doesn't have a good reason to ever change?).
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 was thinking that backend could decide whether to cache on per file basis.
E.g for big compressed files. Or frequently requested files. You decide.
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.
Please reply if you want per file or per class. I'll change tomorrow.
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 a class property. I think if we were to implement such a dynamic caching logic there's a good chance the checks you mention would live inside the ZipFS rather than the backend.
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.
Pushed
b121b19
to
086fc57
Compare
What's the problem this PR addresses?
Fixes #6758
Checklist