Skip to content
Snippets Groups Projects
Commit 56c3f807 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Save JS heap memory by using a hash of the achive contents for map key

Rather than the content listing itself (which can be a very long string).
parent 8d2b340b
No related branches found
No related tags found
No related merge requests found
......@@ -133,11 +133,12 @@ for(var i in dir_list) {
}
} catch(e) { }
if(contents) {
var key = JSON.stringify(contents);
var key = sha1_calc(JSON.stringify(contents));
if(!arc[key])
arc[key] = [];
arc[key].push(file);
}
contents = undefined;
}
total_bytes += file.size;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment