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

Issue 2468973003: Improve updateOriginsEliding_ performance. (Closed)

Created:
4 years, 1 month ago by vabr (Chromium)
Modified:
4 years, 1 month ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2883
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 Review-Url: https://codereview.chromium.org/2439453005 Cr-Commit-Position: refs/heads/master@{#427028} (cherry picked from commit 68f4faa15a37a66d07d374cd7df3dfd296ff957f) Committed: https://chromium.googlesource.com/chromium/src/+/be34c6f71676c182cd4a6266af446a9491d539f2

Patch Set 1 #

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 2 chunks +18 lines, -4 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
vabr (Chromium)
4 years, 1 month ago (2016-11-01 17:45:35 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
be34c6f71676c182cd4a6266af446a9491d539f2.

Powered by Google App Engine
This is Rietveld 408576698