-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improve pnp loader speed and memory: jszip implementation #6688
base: master
Are you sure you want to change the base?
Conversation
6e716bb
to
fdd896e
Compare
8c5a405
to
5a847fd
Compare
@arcanis review pls.
|
5a847fd
to
bb952e4
Compare
@arcanis if you want I can move jszip implementation into my repo, and add as external dependency from berry. |
minizip: { | ||
description: `Whether Yarn should use minizip to extract archives`, | ||
type: SettingsType.BOOLEAN, | ||
default: false, | ||
}, |
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.
Since the main benefit of this PR is to decrease the runtime footprint (by comparison the install doesn't have a lot to gain, since only unplugged packages are extracted on the disk and there's very little of them), I'd rather keep the existing codepath for unplug (to simplify the changes as much as possible).
@@ -115,6 +123,15 @@ const plugin: Plugin<CoreHooks & StageHooks> = { | |||
default: [], | |||
isArray: true, | |||
}, | |||
experimentalZipImplementation: { |
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.
experimentalZipImplementation: { | |
pnpZipImplementation: { |
entries.push({ | ||
name, | ||
os, | ||
mtime: 0, //we dont care, |
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.
We use 456789000
(see SAFE_TIME
)
} | ||
|
||
export class ZipFS extends BasePortableFakeFS { | ||
private readonly libzip: Libzip; | ||
export interface ZipImpl { |
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.
nit: Can you move it to a ZipImplementation.ts
file?
Hey @goloveychuk! No it's fine, I prefer to have it inside this repository at least as long as it's experimental; I still have to review this PR, it's pretty large (even discounting the test artifacts) and I've been extremely busy at work since the beginning of the year. I'll try to finish the review by next week. |
Thank you. |
What's the problem this PR addresses?
rework of #6671
TODO:
...
How did you fix it?
...
Checklist