Status: Accepted
Owner: [email protected]
CC: [email protected],  [email protected],  [email protected]
Labels: Type-Bug Priority-Medium Harmony

New issue 2699 by [email protected]: WeakMaps cause long GC pauses
http://code.google.com/p/v8/issues/detail?id=2699

Using large WeakMaps to store many references introduces long GC pauses. The following snippet reproduces the problem in Chrome by starting the DevTools timeline recording and repeatedly click the refresh button.

<script>
/*
// array for storage
var map = []
function add(key, value) {
  map.push(key, value);
}
*/

// weakmap for storage
var map = new WeakMap
function add(key, value) {
  map.set(key, value);
}

setTimeout(function() {
  for (var i = 0; i < 1000000; i++)
    add({}, {});
}, 1000);
</script>

Attachments:
        Array GC.png  258 KB
        WeakMap GC.png  260 KB

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to