Open gitfoxi opened 8 years ago
This could be my fault because I don't know anything about javascript but it looks like the chunks don't get garbage collected. I got this far:
var drop = require('drag-and-drop-files') var concat = require('concat-stream') var fileReaderStream = require('filereader-stream') var zlib = require('zlib') drop(document.body, function(files) { var first = files[0] console.log("start gzip " + first.name); gzip = zlib.createGzip({'level':1}) gunzip = zlib.createGunzip() // fileReaderStream(first).pipe(gzip.pipe(gunzip)) datin = fileReaderStream(first) // datin.setEncoding('utf8') datin.pipe(gzip) gzip.pipe(gunzip) gunzip.setEncoding('utf8') var count = 0 gunzip.on('data', function(chunk) { count = count + chunk.length }) gunzip.on('finish', function() { console.log("done, got " + count + " bytes") }) })
When I drop a 300MB file on the browser, I watch the memory go up and up. When it's done, there's a bunch of blob:// objects like:
blob://
If I do it with the debugger closed, the problem doesn't occur. Does that mean it's Safari's fault? Reporting bugs to Apple is no fun.
Hmm yea seems like a Safari specific thing
This could be my fault because I don't know anything about javascript but it looks like the chunks don't get garbage collected. I got this far:
When I drop a 300MB file on the browser, I watch the memory go up and up. When it's done, there's a bunch of
blob://
objects like: