New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in deleteAll in Maps #1701
Comments
i reproduced this and have a few additional findings:
var collectionSize = 15;
var totalIterations = 18;
var map = Immutable.OrderedMap();
var clickCount = 0;
for (var i = 0; i < collectionSize - 1; i++) {
map = map.set(i, {a: i})
}
var previousIndex = collectionSize - 1;
var index;
for (var i = 0; i < totalIterations; i++) {
// First, add a new item
index = Math.random() * 100;
map = map.set(index, {a: index});
// Then delete the previously added item
map = map.deleteAll([previousIndex]);
// Update previousIndex for next iteration
previousIndex = index;
}
map; by the end of the above code snippet, the amount of time it takes to trigger the bug seems to remain symmetrical from the distance away from size 15. when collectionSize = 1, it takes 32 iterations, which is the same for collectionSize = 29. |
Hi, This has been fixed in the latest rc Thank you for your patience ! |
This issue is with Maps have 15 or more elements,
How to reproduce:
e.g
e.g
e.g.
A working example of this issue can be found in this link:
http://jsfiddle.net/n8e9ufgc/4
Version : 4.0.0.-rc.12
The text was updated successfully, but these errors were encountered: