You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently gets stuck due to #1409, after that the it looks like performance is slow due to ZipFS.readSync calling ZipFS.readFileSync afresh on each read into the buffer.
Describe the user story
@aws-cdk/aws-s3-deployment has a 10mb Zip file inside it that hashes on each run with
https://github.com/aws/aws-cdk/blob/a5c06a3a27b39a5315d0cfd0d34b3c1b25cfc464/packages/%40aws-cdk/core/lib/fs/fingerprint.ts
Currently gets stuck due to #1409, after that the it looks like performance is slow due to
ZipFS.readSync
callingZipFS.readFileSync
afresh on each read into the buffer.There's a test repo to reproduce - https://github.com/markdingram/yarn-zip
Ejecting is a workaround.
Describe the solution you'd like
Cache the file contents in the
ZipFS.fds
Map on first read to serve subsequent requests.Describe the drawbacks of your solution
Memory pressure if Zip Files aren't closed after use by existing consumers? Or many files are opened concurrently.
Describe alternatives you've considered
Store an open native File handle in the ZipFS.fds map on first read. Seems more complicated than the proposed approach?
Additional context
Add any other context or screenshots about the feature request here.
Repro - https://github.com/markdingram/yarn-zip
The text was updated successfully, but these errors were encountered: