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

Issue 2077343002: Improve performance to remove OPTIONs from a single-selection SELECT. (Closed)

Created:
4 years, 6 months ago by tkent
Modified:
4 years, 6 months ago
Reviewers:
keishi
CC:
apavlov+blink_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, eae+blinkwatch, jchaffraix+rendering, kozyatinskiy+blink_chromium.org, leviw+renderwatch, lushnikov+blink_chromium.org, pdr+renderingwatchlist_chromium.org, pfeldman+blink_chromium.org, sergeyv+blink_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve performance to remove OPTIONs from a single-selection SELECT. LayoutMenuList::updateOptionsHeightWidth() is an O(n) function to get maximum OPTION width and height. We had a bad performance because it is called whenever we remove a selected OPTION from a SELECT. This CL changes the timing of updateOptionsHeightWidth(). Old: It was called by updateFromElement() after an OPTION is added/removed. updateOptionsHeightWidth() makes layout dirty only if maximum width/height was changed. New: OPTION addition/removal makes maximum width/height dirty and makes layout dirty, and updateOptionsHeightWidth() is called only if the maximum width/height is referred. The new behavior makes layout dirty more frequently, however it reduces the number of updateOptionsHeightWidth() calls significantly. This CL makes PerformanceTests/DOM/select-single-remove.html faster. On my local machine, 5.1 runs/s -> 45.1 runs/s Test update: * http/tests/webfont/popup-menu-load-webfont-after-open.html LayoutMenuList correctly updates its width and height after this CL. * fast/repaint/control-clip.html Extra invalidation as expected. BUG=620142 Committed: https://crrev.com/1b32ab54ae3451e24152fc1e433b7e1cb44ac56e Cr-Commit-Position: refs/heads/master@{#400903}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -40 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorTraceEvents.h View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutMenuList.h View 3 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutMenuList.cpp View 5 chunks +16 lines, -29 lines 0 comments Download

Messages

Total messages: 14 (9 generated)
tkent
Keishi, would you review this please?
4 years, 6 months ago (2016-06-21 03:30:21 UTC) #8
keishi
LGTM
4 years, 6 months ago (2016-06-21 05:10:37 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2077343002/60001
4 years, 6 months ago (2016-06-21 05:45:38 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:60001)
4 years, 6 months ago (2016-06-21 05:50:29 UTC) #12
commit-bot: I haz the power
4 years, 6 months ago (2016-06-21 05:51:58 UTC) #14
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/1b32ab54ae3451e24152fc1e433b7e1cb44ac56e
Cr-Commit-Position: refs/heads/master@{#400903}

Powered by Google App Engine
This is Rietveld 408576698