Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Out of memory when filtering large sparse array #4074

Closed
middenview opened this issue Oct 2, 2012 · 3 comments
Closed

Out of memory when filtering large sparse array #4074

middenview opened this issue Oct 2, 2012 · 3 comments

Comments

@middenview
Copy link

Problem occurs with a very large sparse array - first index value that is not undefined is in the millions.

With code of the form below, the debug statement never appears and an out of memory error is reported after a couple of minutes.

This may be a requirement of the language or a performance issue rather than a bug.

var res = this.sparse.filter(function(x,i,a)
{
logger.debug(x);
return (x.isLoggedOn && (x.smallArr.indexOf(groupId) != -1));
});

@langpavel
Copy link

Try it in your Chrome / Chromium / Canary browser.
This should be reported at V8, not node

@piscisaureus
Copy link

@middenview Although I can reproduce the issue, you should indeed report it to the v8 maintainers. See http://code.google.com/p/v8/issues/list.

@middenview
Copy link
Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants