Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Issue 984103005: Remove reserveCapacity call from SharedBuffer::mergeSegmentsIntoBuffer(). (Closed)

Created:
5 years, 9 months ago by reveman
Modified:
5 years, 9 months ago
Reviewers:
CC:
blink-reviews
Target Ref:
refs/branch-heads/chromium/2272
Project:
blink
Visibility:
Public.

Description

Remove 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -1 line) Patch
M Source/platform/SharedBuffer.cpp View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 1 (0 generated)
reveman
5 years, 9 months ago (2015-03-10 21:50:30 UTC) #1
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as 191658.

Powered by Google App Engine
This is Rietveld 408576698