Memory leak on IE11
Hi there, as part of a Vue.js app, we used the following snippet to compress attached XML files before posting them to the web server. However, on IE11. even a single XML file (The raw XML is about 25MiB) allocates at least 1GB of ram and eventually forces the browser to crash. The same implementation on FF and Chrome works as intended.
Tried different compression options and even removing the HTTP post but did not help. Is there anything we can do?
onInputFieldChange(fieldName, files){
let formData = new FormData()
let zip = new JSZip();
for (let file of files){
zip.file(file.name, file);
}
zip.generateAsync({type:"blob", mimeType: "text/xml",
compression: "DEFLATE",
compressionOptions: {
level: 6
}
}, (metadata)=>{
this.compressingProgressPercent = metadata.percent.toFixed(2);
}).then((zipfile)=>{
formData.append(this.uploadFieldName, zipfile);
this.httpPostXml(formData).then(()=>{
// done
})
});
}
It looks like the memory leak fixed by #429 (not yet released). Could you try with the master branch ? (you will need to re-generate the dist/ folder with grunt build)
JSZip v3.1.5 has been released and includes the fix from #429. Does it solve the issue ?
Hi dduponchel, Yes in v3.1.5 the memory consumption is normal. However the performance on IE compared to Chrome or Firefox is a different story.
Tested with 4 XML files around 140MiB in total. Chrome(61) -> 14 seconds Firefox(57) -> 13 seconds IE(11) -> 2 minutes 40 seconds
Thanks for your effort ( Should I close this ticket and open a performance related ticket?)
We won't be fixing any more bugs related to Internet Explorer, as it is not a target we want to support in the future. Closing.