DescriptionRemove reserveCapacity call from SharedBuffer::mergeSegmentsIntoBuffer().
Reserving the exact capacity each time mergeSegmentsIntoBuffer()
is called is triggering quadratic complexity out of the
otherwise well-behaved PurgeableVector class. The reason for
this is that it bypasses the exponential growth that is normally
used when growing a vector and makes each call reallocated and
copy all previous data.
This behavior is especially bad when PurgeableVector is backed by
discardable memory as it puts an enormous pressure on the
discardable memory system by constantly reallocating buffers
that are potentially very large.
BUG=430940, 460995
Review URL: https://codereview.chromium.org/972283002
git-svn-id: svn://svn.chromium.org/blink/trunk@191242 bbb929c8-8fbe-4397-9dbb-9b2b20218538
(cherry picked from commit b7fa221316741a986db58791f7cd57a4a9af276b)
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191658
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|