Reputation: 1869
I'm considering a possibility of doing some computation by jquery only. I would need to save few huge hashes in memory.
I wonder how much memory is allocated for one hash, which contains double value and a date and has 7k entries?
Upvotes: 1
Views: 78
Reputation: 4735
Here's a rough estimate, with chrome heap snapshot (fiddle used: http://jsfiddle.net/Hukps/3/) First snapshot is without any data, then snapshots increase by 7000 records.
So I would say something like 0.6-0.7 MB.
fiddle code:
window.data = [];
$(go).click(function(){
var count = 7000;
for (var i = 0; i< count ; i++)
{
window.data.push({
d:9007199254740992,
dt: new Date()
});
}
console.log(window.data.length);
});
Upvotes: 2
Reputation: 2784
Upvotes: 2