Patch to follow. This test takes too much time since there is a linear array index iteration: var f = []; f[4294967294] = 4294967294; console.log("%O", f) Now we will choose between array index iteration and object properties iteration for sparse arrays.
Created attachment 182747 [details] Patch
Created attachment 182787 [details] Patch
Comment on attachment 182787 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182787&action=review > Source/WebCore/ChangeLog:8 > + Now we will choose between array index iteration and object properties iteration for sparse arrays. It is not clear from the test case how this helps. > Source/WebCore/inspector/front-end/ObjectPropertiesSection.js:651 > + if (toIndex - fromIndex < 250000) { Magic number > Source/WebCore/inspector/front-end/ObjectPropertiesSection.js:749 > + var ownPropertyNames = Object.getOwnPropertyNames(this); Looks like a lot of copypaste.
Comment on attachment 182787 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182787&action=review >> Source/WebCore/ChangeLog:8 >> + Now we will choose between array index iteration and object properties iteration for sparse arrays. > > It is not clear from the test case how this helps. otherwise it times out. >> Source/WebCore/inspector/front-end/ObjectPropertiesSection.js:651 >> + if (toIndex - fromIndex < 250000) { > > Magic number done. >> Source/WebCore/inspector/front-end/ObjectPropertiesSection.js:749 >> + var ownPropertyNames = Object.getOwnPropertyNames(this); > > Looks like a lot of copypaste. Yes, but I don't know how to do better... (any ideas?) These 2 functions are to be serialized to a string, thus if I extract a shared function, it should be also serialized to a string, passed as an argument to the original two, and evaluated back to the Function. I thought it's too much complicated to avoid (small) code dups.
Created attachment 182957 [details] Patch
Created attachment 183172 [details] Rebased
Comment on attachment 183172 [details] Rebased Clearing flags on attachment: 183172 Committed r140150: <http://trac.webkit.org/changeset/140150>
All reviewed patches have been landed. Closing bug.