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 2093563005: Improve performance to remove OPTIONs from a single-selection SELECT. (Closed)

Created:
4 years, 5 months ago by Stephen Chennney
Modified:
4 years, 5 months ago
Reviewers:
tkent
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@2743
Target Ref:
refs/pending/branch-heads/2743
Project:
chromium
Visibility:
Public.

Description

Improve performance to remove OPTIONs from a single-selection SELECT. Manual merge from m53 to m52. 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. TBR=tkent@chromium.org BUG=620142 Review-Url: https://codereview.chromium.org/2077343002 Cr-Commit-Position: refs/heads/master@{#400903} (cherry picked from commit 1b32ab54ae3451e24152fc1e433b7e1cb44ac56e) Committed: https://chromium.googlesource.com/chromium/src/+/e5e943c56399f02d9ffe9de622d38733fb956cbf

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -25 lines) Patch
M third_party/WebKit/Source/core/inspector/InspectorTraceEvents.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutMenuList.h View 3 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutMenuList.cpp View 4 chunks +14 lines, -18 lines 0 comments Download

Messages

Total messages: 3 (1 generated)
Stephen Chennney
Committed patchset #1 (id:1) manually as e5e943c56399f02d9ffe9de622d38733fb956cbf (presubmit successful).
4 years, 5 months ago (2016-06-24 13:42:37 UTC) #2
tkent
4 years, 5 months ago (2016-06-26 23:45:44 UTC) #3
Message was sent while issue was closed.
lgtm.
Thank you!

Powered by Google App Engine
This is Rietveld 408576698