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

Issue 2439453005: Improve updateOriginsEliding_ performance. (Closed)

Created:
4 years, 2 months ago by jdoerrie
Modified:
4 years, 1 month ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, gcasto+watchlist_chromium.org, michaelpg+watch-options_chromium.org, arv+watch_chromium.org, vabr+watchlistpasswordmanager_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve updateOriginsEliding_ performance. This CL is part of the effort to improve performance of the password manager settings. In particular, this CL fixes layout thrashing in the updateOriginsEliding_ code. Prior to this change the code was first reading style information from the DOM and then changing it in a loop. This change creates a canvas element that is not part of the DOM. It then uses the canvas to do the text measurements, thus avoiding the repainting of the DOM. In the end, it writes the final obtained string in the DOM, and thus does not change the display of the saved passwords. Reference: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/measureText BUG=651049 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/68f4faa15a37a66d07d374cd7df3dfd296ff957f Cr-Commit-Position: refs/heads/master@{#427028}

Patch Set 1 #

Total comments: 7

Patch Set 2 : Adressed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -4 lines) Patch
M chrome/browser/resources/options/password_manager.js View 1 2 chunks +18 lines, -4 lines 0 comments Download

Messages

Total messages: 22 (7 generated)
jdoerrie
4 years, 2 months ago (2016-10-21 12:31:50 UTC) #2
jdoerrie
4 years, 2 months ago (2016-10-21 12:32:14 UTC) #4
vabr (Chromium)
Drive-by optional comment below. (The change LGTM, but I am no OWNER here.) Thanks! Vaclav ...
4 years, 2 months ago (2016-10-21 13:15:31 UTC) #6
jdoerrie
https://codereview.chromium.org/2439453005/diff/1/chrome/browser/resources/options/password_manager.js File chrome/browser/resources/options/password_manager.js (right): https://codereview.chromium.org/2439453005/diff/1/chrome/browser/resources/options/password_manager.js#newcode219 chrome/browser/resources/options/password_manager.js:219: textContent = '…' + textContent.substring(2); On 2016/10/21 13:15:31, vabr ...
4 years, 2 months ago (2016-10-21 14:15:00 UTC) #7
vabr (Chromium)
https://codereview.chromium.org/2439453005/diff/1/chrome/browser/resources/options/password_manager.js File chrome/browser/resources/options/password_manager.js (right): https://codereview.chromium.org/2439453005/diff/1/chrome/browser/resources/options/password_manager.js#newcode219 chrome/browser/resources/options/password_manager.js:219: textContent = '…' + textContent.substring(2); On 2016/10/21 14:15:00, jdoerrie ...
4 years, 2 months ago (2016-10-21 14:20:45 UTC) #8
stevenjb
We're in the process of switching to chrome://md-settings, so I'm not sure we want to ...
4 years, 2 months ago (2016-10-21 19:12:44 UTC) #10
vabr (Chromium)
On 2016/10/21 19:12:44, stevenjb wrote: > We're in the process of switching to chrome://md-settings, so ...
4 years, 2 months ago (2016-10-21 19:23:12 UTC) #11
hcarmona
On 2016/10/21 19:12:44, stevenjb wrote: > We're in the process of switching to chrome://md-settings, so ...
4 years, 2 months ago (2016-10-21 19:44:41 UTC) #12
vabr (Chromium)
On 2016/10/21 19:44:41, Hector Carmona wrote: > On 2016/10/21 19:12:44, stevenjb wrote: > > We're ...
4 years, 2 months ago (2016-10-21 19:56:43 UTC) #13
stevenjb
OK, thanks Hector. Owner lgtm. https://codereview.chromium.org/2439453005/diff/1/chrome/browser/resources/options/password_manager.js File chrome/browser/resources/options/password_manager.js (right): https://codereview.chromium.org/2439453005/diff/1/chrome/browser/resources/options/password_manager.js#newcode215 chrome/browser/resources/options/password_manager.js:215: } nit: {} not ...
4 years, 2 months ago (2016-10-21 19:58:40 UTC) #14
hcarmona
On 2016/10/21 19:56:43, vabr (Chromium) wrote: > On 2016/10/21 19:44:41, Hector Carmona wrote: > > ...
4 years, 2 months ago (2016-10-21 20:48:42 UTC) #15
jdoerrie
https://codereview.chromium.org/2439453005/diff/1/chrome/browser/resources/options/password_manager.js File chrome/browser/resources/options/password_manager.js (right): https://codereview.chromium.org/2439453005/diff/1/chrome/browser/resources/options/password_manager.js#newcode215 chrome/browser/resources/options/password_manager.js:215: } On 2016/10/21 19:58:40, stevenjb wrote: > nit: {} ...
4 years, 1 month ago (2016-10-24 07:34:55 UTC) #16
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/2439453005/20001
4 years, 1 month ago (2016-10-24 07:35:27 UTC) #19
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-10-24 08:32:53 UTC) #20
commit-bot: I haz the power
4 years, 1 month ago (2016-10-24 08:35:28 UTC) #22
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/68f4faa15a37a66d07d374cd7df3dfd296ff957f
Cr-Commit-Position: refs/heads/master@{#427028}

Powered by Google App Engine
This is Rietveld 408576698