Commit 52faf14f authored by Rob Swindell's avatar Rob Swindell 💬
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
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment