Skip to content
Snippets Groups Projects
Commit 52faf14f 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 e7c72051
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -133,11 +133,12 @@ for(var i in dir_list) { ...@@ -133,11 +133,12 @@ for(var i in dir_list) {
} }
} catch(e) { } } catch(e) { }
if(contents) { if(contents) {
var key = JSON.stringify(contents); var key = sha1_calc(JSON.stringify(contents));
if(!arc[key]) if(!arc[key])
arc[key] = []; arc[key] = [];
arc[key].push(file); arc[key].push(file);
} }
contents = undefined;
} }
total_bytes += file.size; total_bytes += file.size;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment