Comments (5)
Hey, we're still investigating on our end. might be an issue on our end.
Closing for now, will re-open once i've more information if applicable.
Thank you so much for the quick response! and sorry for bothering.
from fflate.
If there's a memory leak, I would think because you are holding on to the references to the stream outputs for too long. After processing a chunk, the async streams drop all references to it, as far as I can tell, but I'll investigate as well.
Also, the second error looks more like an attempt to push the same Uint8Array to AsyncGzip that you use yourself. The docs mention that all pushed chunks are consumed in async streams (they become inaccessible after pushing). If you try to read from some data you've already pushed you may get this error. If it's actually from fflate, please send the full stack trace.
from fflate.
Unfortunately the error is coming from an extension and is minified so hard to procude a readable trace.
Also still struggling to reproduce locally,
But let me try and give some more context that might help:
- We're compressing a lot of files(hundreds) from the extension.
- We're doing it from the extension background page.
- We're using Rescript, so might be a bit hard to trace down the JS version of that. but from going through the code, the only place where the buffer is being re-used is when an error happened in asyncGzip
Basically the function we've is:
try gzipping, if it succeeds, return the gzipped buffer.
if any error happens(try/catch) return the original buffer
from fflate.
I suspect a memory leak since when i'm doing two runs and doing a memory compare it seems like a lot of retained buffers are still there.
from fflate.
Still looking into this issue, maybe it applies to only a specific set of environments. What browser/engine are you using?
from fflate.
Related Issues (20)
- Compression Streams ponyfill for browser HOT 1
- Deflate/Inflate does not work with zlib/gzip c++ HOT 7
- Add Bzip2?
- Hangs on gunzipSync of compressed content with invalid dictionary HOT 3
- Option to shorten output as much as possible HOT 3
- Incorrect argument order in AsyncFlateStreamHandler HOT 5
- Truncated output of gunzip if SIZE footer is incorrect HOT 5
- return uncompressed size instead of resized output buffer HOT 4
- Improve zip documentation HOT 1
- The encoded data was not valid for encoding utf-8 HOT 1
- Streams onData do not work as expected anymore HOT 8
- CDN bundle for 0.8.1 is broken HOT 2
- Async unzip maxing out CPU and memory for some files HOT 3
- fflate.decompressSync is not a function when using `nifti-reader-js` (React) HOT 7
- Occasional CRC Errors When Streaming Data into Zip using AsyncZipDeflate HOT 7
- `zipSync` can get order of ZIP entries wrong, due to how objects work HOT 3
- delete the rust code
- The 2nd+ JPG images in a zip stream being created are corrupt for some reason? HOT 9
- `gunzipSync` failing (0 gzip length) on some npm package tarballs HOT 1
- Unexpected EOF when inflating ZIP HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fflate.