RESOLVED FIXED 75610
push/shift fifo may consume excessive memory
https://bugs.webkit.org/show_bug.cgi?id=75610
Summary push/shift fifo may consume excessive memory
Gavin Barraclough
Reported 2012-01-05 01:05:48 PST
Array object commonly store data in a vector, consisting of a portion that is in use, a pre-capacity (m_indexBias) and a post-capacity (the delta between m_length and m_vectorLength). Calls to shift with grow the pre-capacity, and the current algorithm for increaseVectorLength (used by push, or [[Put]]) will never shrink the pre-capacity, so a push/shift fifo may consume an inordinate amount of memory, whilst having a relatively small active length.
Attachments
Fix (4.45 KB, patch)
2012-01-05 01:13 PST, Gavin Barraclough
sam: review+
webkit.review.bot: commit-queue-
Gavin Barraclough
Comment 1 2012-01-05 01:13:17 PST
Created attachment 121237 [details] Fix 10% overall speedup on the micro-benchmark attached to bug #75588 , largely due to a 20x speedup on the two smaller fifo tests (I think this makes sense - they'll currently be serving as tests for the OS's memory allocation speed!)
WebKit Review Bot
Comment 2 2012-01-05 09:40:03 PST
Comment on attachment 121237 [details] Fix Attachment 121237 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11146007 New failing tests: http/tests/inspector/network/download.html
Gavin Barraclough
Comment 3 2012-01-05 11:19:24 PST
(In reply to comment #2) > (From update of attachment 121237 [details]) > Attachment 121237 [details] did not pass chromium-ews (chromium-xvfb): > Output: http://queues.webkit.org/results/11146007 > > New failing tests: > http/tests/inspector/network/download.html Works for me, and this bug doesn't affect Chromium. Bad EWS.
Gavin Barraclough
Comment 4 2012-01-05 11:35:28 PST
Fixed in 104184.
Note You need to log in before you can comment on or make changes to this bug.