Changeset 111133 in webkit
- Timestamp:
- Mar 18, 2012 9:59:46 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r111132 r111133 1 2012-03-18 Kentaro Hara <haraken@chromium.org> 2 3 Change the initial buffer size of a plain text 4 https://bugs.webkit.org/show_bug.cgi?id=81192 5 6 Reviewed by Dimitri Glazkov. 7 8 r111109 changed the initial buffer size of a plain text 9 from 1<<16 to 1<<15 in Chromium/Mac only, for the following reasons: 10 11 - As far as I experimented locally, while 1<<15 is better than 1<<16 in Chromium/Mac, 12 1<<15 and 1<<16 are the same in AppleWebKit/Mac and Chromium/Linux (their performance 13 "gap" exists at between 1<<17 and 1<<18). 14 - The reason why I changed 1<<16 to 1<<15 in Chromium/Mac only is that 15 the value highly depends on the underlying malloc system and I was a bit afraid 16 that changing to 1<<15 _might_ cause unintentional performance regression in some 17 platform. 18 19 That being said, it seems that 1<<15 would not be worse than 1<<16 in all platforms, 20 and we should just keep the value consistent. In the first place, according to anttik 21 (who wrote 1<<16 a long time ago), there was no strong reason for 1<<16. 22 23 Based on these observations (See https://bugs.webkit.org/show_bug.cgi?id=81192 24 for more details), this patch unifies the value to 1<<15 in all platforms. 25 26 No tests. No change in behavior. 27 28 * editing/TextIterator.cpp: 29 (WebCore::plainTextToMallocAllocatedBuffer): 30 1 31 2012-02-13 Robert Hogan <robert@webkit.org> 2 32 -
trunk/Source/WebCore/editing/TextIterator.cpp
r111109 r111133 2515 2515 2516 2516 // The initial buffer size can be critical for performance: https://bugs.webkit.org/show_bug.cgi?id=81192 2517 #if PLATFORM(CHROMIUM) && PLATFORM(MAC)2518 2517 static const unsigned cMaxSegmentSize = 1 << 15; 2519 #else2520 static const unsigned cMaxSegmentSize = 1 << 16;2521 #endif2522 2518 bufferLength = 0; 2523 2519 typedef pair<UChar*, unsigned> TextSegment;
Note: See TracChangeset
for help on using the changeset viewer.