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

Issue 2105863003: Improve performance of SELECT element by optimizing Vector. (Closed)

Created:
4 years, 5 months ago by tkent
Modified:
4 years, 5 months ago
Reviewers:
keishi, sof
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve performance of SELECT element by optimizing Vector. Replace Vector::clear() with Vector::resize(0) to avoid to deallocate Vector buffers. Removing 20,000 OPTIONs: 7,595ms -> 5,779ms BUG=620142, 624220 Committed: https://crrev.com/8881397e890dd70a187a957ae6910f141d378eb5 Cr-Commit-Position: refs/heads/master@{#402720}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M third_party/WebKit/Source/core/html/HTMLSelectElement.cpp View 2 chunks +2 lines, -2 lines 2 comments Download

Messages

Total messages: 11 (4 generated)
tkent
Keishi, would you review this please?
4 years, 5 months ago (2016-06-29 01:21:53 UTC) #2
keishi
LGTM
4 years, 5 months ago (2016-06-29 02:34:53 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2105863003/1
4 years, 5 months ago (2016-06-29 03:30:19 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-06-29 04:41:35 UTC) #6
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/8881397e890dd70a187a957ae6910f141d378eb5 Cr-Commit-Position: refs/heads/master@{#402720}
4 years, 5 months ago (2016-06-29 04:43:44 UTC) #8
sof
https://codereview.chromium.org/2105863003/diff/1/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp File third_party/WebKit/Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/2105863003/diff/1/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp#newcode803 third_party/WebKit/Source/core/html/HTMLSelectElement.cpp:803: m_listItems.resize(0); Isn't there a risk of m_listItem's backing store ...
4 years, 5 months ago (2016-06-29 05:43:24 UTC) #10
tkent
4 years, 5 months ago (2016-06-29 06:07:46 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/2105863003/diff/1/third_party/WebKit/Source/c...
File third_party/WebKit/Source/core/html/HTMLSelectElement.cpp (right):

https://codereview.chromium.org/2105863003/diff/1/third_party/WebKit/Source/c...
third_party/WebKit/Source/core/html/HTMLSelectElement.cpp:803:
m_listItems.resize(0);
On 2016/06/29 at 05:43:24, sof wrote:
> Isn't there a risk of m_listItem's backing store never shrinking for a
<select/> with many and then very few <option/>s?

There is.
But I guess such scenario is not common.

Powered by Google App Engine
This is Rietveld 408576698