New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 32 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment
link

Issue 651049: Password manager settings hanging

Reported by sabineb@chromium.org, Sep 28 2016 Project Member

Issue description

Version: Chrome 53.0.2785.116 
OS: OSX 10.11.6 

drees@, could you please provide information on what exactly happens when you visit a.) chrome://settings/passwords and b.) passwords.google.com? Could you also please attach  screenshots? Thanks!

What steps will reproduce the problem?
(1) Visit chrome://settings/passwords and observe that it "hangs"
(2) Visit passwords.google.com and observe *to be completed by the original bug reporter*

What is the expected output?
The list of stored accounts should show

What do you see instead?
 *details to be completed by the original bug reporter*
 

Comment 1 by vabr@chromium.org, Sep 28 2016

Labels: Needs-Feedback

Comment 2 Deleted

Comment 3 Deleted

Comment 4 by drees@google.com, Sep 28 2016

I also reported an issue through Chrome "Report an issue..." as dave@ubiqsoft.com in case that has any additional useful info.

Also, here is a good summary of same issues with several commenters saying they have the same issue - https://chromeunboxed.com/chrome-os-bug-report-password-manager-screen-freezing-crashing/

Comment 5 by sabineb@chromium.org, Sep 28 2016

Cc: vasi...@chromium.org kolos@chromium.org zea@chromium.org
Thanks! So it seems like the bug(s) is affecting mainly Mac users, who are syncing passwords and have a large number of passwords saved.

drees@, could you please check if your saved credentials are being autofilled correctly on the sign in form?

Comment 6 by sabineb@chromium.org, Sep 28 2016

Cc: ew...@chromium.org

Comment 7 by jainabhi...@chromium.org, Sep 29 2016

Labels: -Needs-Feedback
Not just MAC, this issue affects windows users as well as seen in Product Forums
https://productforums.google.com/forum/#!topic/chrome/aj2KFNKJKnc

Comment 8 by vabr@chromium.org, Sep 29 2016

The hint about the multiple hundreds of passwords is interesting, I'll see if I can reproduce the issue with, say, 1000 saved passwords, and report back.

Comment 9 by vabr@chromium.org, Sep 29 2016

Labels: OS-Linux
Owner: vabr@chromium.org
Status: Started (was: Untriaged)
And for sure, having 1000 passwords slows down about:settings/passwords to being unusable even on a very powerful desktop machine. So far I tested on an account with a custom passphrase, I'll try one without to check if the p.g.c issue is related or not.

Attached is a CSV list of 1001 passwords, which people can import to check this out (disclaimer: the import is not easy to revert, so please only do it on a fresh test account you don't mind flushing afterwards; activate importing at chrome://flags/#password-import-export

Comment 10 by vabr@chromium.org, Sep 29 2016

Forgot the attachment.
pwds.csv
77.1 KB View Download

Comment 11 by vabr@chromium.org, Sep 29 2016

The impact of the 1000 passwords which I observe on passwords.google.com is also noticeable, but much smaller than on the native settings page, and seems appropriate to the passwords count. Also, once loaded, the website is responsive, whereas the native settings struggle to even scroll around.

I'll have a look at the native settings. I will not attempt to solve the p.g.c issue here, there is an internal bug filed for that one.

Comment 12 by vabr@chromium.org, Sep 29 2016

Cc: dbeam@chromium.org
Dumping my state for now and Cc-ing dbeam@ in case he has insight what might be slow in redrawing webui/resources/js/cr/ui/list.js:

Set-up: ToT build of Chromium (version 55) on GNU/Linux, a non-syncing profile with a 1000 passwords.

Issue: Loading chrome://settings/passwords takes very long (10+ seconds on a beefy machine), scrolling or even highlight-on-hover takes similarly long, Chrome's task manager shows full CPU usage (but not crazily much memory).

Notes:
* chrome://md-settings/managePasswords seems faster.
* When I tried the optimised official Dev-channel build, it was better for tens of passwords, but comparably slow for the 1000.
* Profiling via DevTools shows cr.ui.List.redraw to be eating 99% of the run time, although splitting that chunk shows calling functions instead of called functions, which is confusing.
* Profiling via DevTools shows "(program)" as taking most of the time during the slow scrolling and highlight-on-hover, not sure what that means.
* console.log of timestamps confirms cr.ui.List.redraw to be the main culprit. However, bisecting it, it looks like most of the time is spent in executing "this.scrollTop = scrollTop;". I could not find whether this is a complex setter, but if it is not, then I'm confused again.

Next steps:
* The impact is limited by the need to have at least many hundreds of passwords stored, therefore I am decreasing the priority to 2. It still needs to be addressed, though, because we want to encourage users to store as many passwords as practical.
* I might be busy in the coming days with quarter planning, but this may also become a starter bug for our coming colleague. Therefore any insights welcome!

Comment 13 by dbeam@chromium.org, Sep 29 2016

Labels: Needs-Bisect
"(program)" probably means a script eval request we've sent directly from the browser -> renderer via IPC (i.e. WebUIMessageHandler::CallJavascriptFunction()). is "setSavedPasswordsList" or "setPasswordExceptionsList" also in the slow part of the stack?

how are you creating a profile with 1000 passwords?  I'd like to try this myself.

can somebody run the bisect script with "-- --user-data-dir=/path/to/profile/with/1000/passwords"?

Comment 14 by dbeam@chromium.org, Sep 29 2016

Cc: hcarmona@chromium.org

Comment 15 by vasi...@chromium.org, Sep 29 2016

dbeam@, you need to go to chrome://flags and enable #password-import-export. After that you can import the file from Comment 10 via chrome://settings/passwords

Comment 16 by drees@google.com, Sep 29 2016

chrome://md-settings/managePasswords actually does seem to work for me (with 2300 passwords), but I didn't know about it until this thread.

And please do note that in addition to chrome://settings locking up, passwords.google.com does as well - which seems to be a server response issue according to #2.

Comment 17 by drees@google.com, Sep 29 2016

Actually, I spoke too soon on chrome://md-settings/managePasswords working for me. The list of passwords seems to be truncated. It stops half way through the domains starting with e.

Also a minor note, I can't export/import passwords because the page locks up and I can't press the import/export buttons.

Comment 18 by dbeam@chromium.org, Sep 29 2016

btw, importing that .csv isn't working for me

Comment 19 by vabr@chromium.org, Sep 30 2016

dbeam@ -- it might be that it works but just really slowly. If you happen to use GNU/Linux with Gnome Keyring, it adds the passwords there one by one and that takes minutes.

To speed it up, you can delete all passwords in the testing account (to clean-up your keyring) and restart Chrome with --password-store=basic. It still may take some seconds to load, after which you might need to reload the settings.

Comment 20 by vabr@chromium.org, Sep 30 2016

Labels: -Pri-1 Pri-2
For the bisect, does anybody know whether there is a Chrome version which actually worked well with 1000+ passwords?

(Also decreasing the priority as announced in #12.)

Comment 21 by tkonch...@chromium.org, Oct 3 2016

Labels: Needs-Feedback
Unable to reproduce the issue on mac 10.11.6 chrome version 53.0.2785.143 by importing the file in comment#10 - No hang observed on chrome://settings/passwords and all the pwds displayed fine on passwords.google.com in few seconds.

vabr@, Could you please let me know if i am missing something here in reproducing the issue.

Comment 22 by vabr@chromium.org, Oct 4 2016

Labels: -Needs-Feedback
tkonchada@ -- thanks for trying!

I checked on my MacBook Pro with Chrome 53.0.2785.143, and the load caused by 1000+ passwords seems noticeable (there is a delay in the hover-selection, in scrolling, in loading). The effect gets stronger with 2500 passwords (attached for import), which is closer to what #3 shows in the screenshots.
2500pwds.csv
194 KB View Download

Comment 23 by drees@google.com, Oct 4 2016

FYI, Here is a screenshot of what I see on passwords.google.com (in Chrome, Safari, or Firefox). There is no noticeable CPU loa, it just never shows the list of signons.
Screen Region 2016-10-04 at 08.46.16.png
66.2 KB View Download

Comment 24 by jmukthavaram@chromium.org, Oct 5 2016

Cc: jmukthavaram@chromium.org
Labels: Needs-Feedback
Tested this issue in Mac 10.11.6 Chrome stable version-53.0.2785.143 with the below steps:
1.Enabled "Passwords Import export flag"
2.Imported 2500.csv file into Chrome://settings/passwords
3.Waited for 15 mins and no passwords observed .
4.No hang observed in passwords screen
5.Clicked on passwords.google.com link
6.Observed only 666records (passwords) instead of 2500 passwords.

drees@ Please confirm if this is the issue you are facing & let us know if i miss anything to reproduce the issue.

Comment 25 by ligim...@chromium.org, Oct 14 2016

 Issue 653939  has been merged into this issue.

Comment 26 by jdoerrie@chromium.org, Oct 19 2016

Using V8 profiling tools I can confirm that setting scrollTop is causing a lot of CPU cycles when opening the password manager:

 [Bottom up (heavy) profile]:
  Note: percentage shows a share of a particular caller in the total
  amount of its parent calls.
  Callers occupying less than 2.0% are not shown.

   ticks parent  name
   1842   32.1%  __pthread_cond_timedwait

   1663   29.0%  blink::ElementV8Internal::scrollTopAttributeSetterCallback(v8::FunctionCallbackInfo<v8::Value> const&)
   1663  100.0%    v8::internal::Runtime_StoreIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*)
   1663  100.0%      LazyCompile: ~redraw chrome://resources/js/cr/ui/list.js:1057:21
   1663  100.0%        LazyCompile: ~set dataModel chrome://resources/js/cr/ui/list.js:114:18
   1663  100.0%          Stub: CEntryStub {1}
   1662   99.9%            LazyCompile: ~setSavedPasswordsList_ chrome://settings-frame/options_bundle.js:15619:37

    565    9.9%  __pthread_cond_wait

I will investigate further how this issue can be mitigated.

Comment 27 by vabr@chromium.org, Oct 20 2016

Owner: jdoerrie@chromium.org
jdoerrie@ is working on this right now

Comment 28 by jdoerrie@chromium.org, Oct 20 2016

After shifting my attention from the Profiler to the Timeline tool (https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/timeline-tool) I realized that 80 % of the time to load the password manager is spent simply on rendering the page when using 2000 passwords. Every password entry gives rise to 6 div nodes (favicon, domain, user, password, close button and wrapping), so the total number of DOM nodes is larger than 12000. All of these nodes have to be placed on the page when we force a page redraw, which alone can last multiple seconds making the page unresponsive. See the attached files for screenshots and raw data.

Also, when hovering and scrolling, every node is checked, which again makes the experience very slow. A straight forward optimization is to add a (max-)height parameter to the CSS of the password list, triggering a slight change to how the passwords are shown (see the different location of the scrollbar in Screenshot_Max_Height.png and Screenshot_Orig_CSS.png). This change alone does not improve the inital loading time of the dialog, but it makes the dialog interact-able. Scrolling, hovering and closing the dialog are now much faster.

I am not familiar with the intrinsic of the rendering engine, but it is my gut feeling that Chrome is more aware of which nodes need to be re-rendered when interacting with the dialogue and thus can optimize the rendering.

There are certainly more places for optimization, and I will investigate this further.
Screenshot_Max_Height.png
202 KB View Download
Screenshot_Orig_CSS.png
218 KB View Download
Screenshot_Timeline_Max_Height.png
229 KB View Download
Screenshot_Timeline_Orig_CSS.png
240 KB View Download
TimelineRawData-orig.json
7.9 MB View Download
TimelineRawData-max-height.json
8.3 MB View Download

Comment 29 by bugdroid1@chromium.org, Oct 24 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/68f4faa15a37a66d07d374cd7df3dfd296ff957f

commit 68f4faa15a37a66d07d374cd7df3dfd296ff957f
Author: jdoerrie <jdoerrie@chromium.org>
Date: Mon Oct 24 08:32:26 2016

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}

[modify] https://crrev.com/68f4faa15a37a66d07d374cd7df3dfd296ff957f/chrome/browser/resources/options/password_manager.js

Comment 30 by bugdroid1@chromium.org, Oct 26 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/948349a43c3c3bd15a05c5b79e66507abfd31a3a

commit 948349a43c3c3bd15a05c5b79e66507abfd31a3a
Author: jdoerrie <jdoerrie@chromium.org>
Date: Wed Oct 26 10:02:35 2016

Fix Password Manager Performance Issues

This change further addresses the performance issue of password manager when
many passwords are saved. Prior to this change a long password list (~1000
entries) can freeze the password manager for multiple seconds.

Inspired by the edit dictionary settings (chrome://settings/editDictionary),
this change removes the |autoExpands| attributes from the saved passwords and
password exceptions lists and adds a CSS |max-height| attribute. This results in
rendering the list almost instantaneously and keeps it responsive with regard to
user interactions.

BUG= 651049 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2443143002
Cr-Commit-Position: refs/heads/master@{#427655}

[modify] https://crrev.com/948349a43c3c3bd15a05c5b79e66507abfd31a3a/chrome/browser/resources/options/password_manager.css
[modify] https://crrev.com/948349a43c3c3bd15a05c5b79e66507abfd31a3a/chrome/browser/resources/options/password_manager.js

Comment 31 by jdoerrie@chromium.org, Oct 26 2016

Status: Fixed (was: Started)
Marking this as fixed, the last CL should fix all remaining perf issues with chrome://settings/passwords. The passwords.google.com issue is tracked internally and has bug id 31801159.

Comment 32 by jdoerrie@chromium.org, Oct 28 2016

Labels: M-55 Merge-Request-55
I request merge of r427655 into branch 2883 (M55).

Comment 33 by dimu@chromium.org, Oct 28 2016

Labels: -Merge-Request-55 Merge-Approved-55 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M55 (branch: 2883)

Comment 34 by bugdroid1@chromium.org, Oct 28 2016

Project Member
Labels: -merge-approved-55 merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a03793f62b38689b30939434ba7d9bbe1afdbdfe

commit a03793f62b38689b30939434ba7d9bbe1afdbdfe
Author: Vaclav Brozek <vabr@chromium.org>
Date: Fri Oct 28 11:37:19 2016

Fix Password Manager Performance Issues

This change further addresses the performance issue of password manager when
many passwords are saved. Prior to this change a long password list (~1000
entries) can freeze the password manager for multiple seconds.

Inspired by the edit dictionary settings (chrome://settings/editDictionary),
this change removes the |autoExpands| attributes from the saved passwords and
password exceptions lists and adds a CSS |max-height| attribute. This results in
rendering the list almost instantaneously and keeps it responsive with regard to
user interactions.

BUG= 651049 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2443143002
Cr-Commit-Position: refs/heads/master@{#427655}
(cherry picked from commit 948349a43c3c3bd15a05c5b79e66507abfd31a3a)

Review URL: https://codereview.chromium.org/2458043002 .

Cr-Commit-Position: refs/branch-heads/2883@{#357}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/a03793f62b38689b30939434ba7d9bbe1afdbdfe/chrome/browser/resources/options/password_manager.css
[modify] https://crrev.com/a03793f62b38689b30939434ba7d9bbe1afdbdfe/chrome/browser/resources/options/password_manager.js

Comment 35 by vabr@chromium.org, Oct 29 2016

@drees -- I'd like to open this bug for public (removing the view restriction for Google only). The only potentially sensitive piece is the mention of your dasher e-mail in #3. Are you OK with making that public, or should I remove that comment before removing the restriction?

Comment 36 by drees@google.com, Oct 29 2016

Thanks. Maybe remove that comment since it also has the sync-internals page? Or is that all sanitized?

Comment 37 by jdoerrie@chromium.org, Oct 31 2016

Labels: Merge-Request-55
I request merge of r427028 into branch 2883 (M55).

Comment 38 by dimu@chromium.org, Oct 31 2016

Labels: -Merge-Request-55 Merge-Approved-55
Your change meets the bar and is auto-approved for M55 (branch: 2883)

Comment 39 by gov...@chromium.org, Oct 31 2016

**** Bulk edit -  please ignore if not applicable ****

Please merge your change to M55 branch 2883 today before 5:00 PM PT or latest by tomorrow, Tuesday (11/01/16) 4:00 PM PT so we can take it for this week Beta release.

Comment 40 by vabr@chromium.org, Oct 31 2016

If anybody can merge r427028, please say so here and feel free to merge. There is public holiday in our office tomorrow, so people on the team are unlikely to be able to merge.

Comment 41 by sheriffbot@chromium.org, Nov 1 2016

Project Member
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 42 by vabr@chromium.org, Nov 1 2016

I seem to be able to run drover on my virtual GNU/Linux machine now, so will attempt the merge of r427028.

Comment 43 by bugdroid1@chromium.org, Nov 1 2016

Project Member
Labels: -merge-approved-55
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/be34c6f71676c182cd4a6266af446a9491d539f2

commit be34c6f71676c182cd4a6266af446a9491d539f2
Author: Vaclav Brozek <vabr@chromium.org>
Date: Tue Nov 01 17:41:28 2016

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)

Review URL: https://codereview.chromium.org/2468973003 .

Cr-Commit-Position: refs/branch-heads/2883@{#404}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/be34c6f71676c182cd4a6266af446a9491d539f2/chrome/browser/resources/options/password_manager.js

Comment 44 by vabr@chromium.org, Nov 2 2016

Reposting the public part of comment #3 before I delete #3 to make this issue public:

========
Summary of what was seen for one account:

Chrome 53.0.2785.116 
OSX 10.11.6 (15G31)
"Google Apps for your Domain" account

Inside chrome://settings/passwords the saved passwords never display. The tab in Chrome Task Manager shows 100% CPU and in most cases Chrome eventually lists the page as non-responsive.

I also can not view passwords in passwords.google.com. It just says Loading... (for at least an hour). I get the same problem on Chrome, Safari, and Firefox.

The problems do not happen with other Google accounts, just this one.

Account has "Encrypt synced passwords with your Google credentials". I have tried resetting sync and it didn't fix the problem. The account has 2138 passwords according to chrome://sync-internals/ and all sync data groups are syncing OK (green in sync-internals).
========

Comment 45 by vabr@chromium.org, Nov 2 2016

Also reposting #2 stripped of one internal URL, for the same reason:
=======
We have started to see these complaints surface in community and user feedback as well.

Debug steps already tried
1. Incognito doesn't help. As soon as user presses settings it opens on the regular non-incognito tab.
2. clearing cache and cookies didn't help.
3. changing hardware acceleration didn't help.
4. Created a new user profile to view passwords
5. Tried disabling all extension in Chrome
6. Same issue on beta and canary as well

Some symptoms
1. freezes while attempting to load the passwords (this happens on a Mac)
2. shows the list of accounts but when I try to show the pw it asks for Admin password but never accepts it (this happens on a PC)
3. Even web version (passwords.google.com) does not load
4. It did eventually load after long time (2+ min), scroll works but if you enter somehthing in search field, it again hangs for 2+ min to load results
5. at passwords.google.com, I see the browser hanging on requests to https://passwords.google.com/settings/_/data?...
6. Users with this issue have problem loading passwords.google.com and have more than 500 passwords saved

We can connect with user on this Forum to get debug data if required : 
https://productforums.google.com/forum/?utm_medium=email&utm_source=footer#!msg/chrome/aj2KFNKJKnc/21IdTeHSBAAJ
=======

Comment 46 by vabr@chromium.org, Nov 2 2016

Labels: -Restrict-View-Google
Ad #36: Thanks for your response.

I ended up deleting #3 from you and #2 from jainabhishek@, and reposting a public digest of those above. I am removing the RVG now.

Comment 47 by vasi...@chromium.org, Nov 3 2016

Cc: mkwst@chromium.org sabineb@chromium.org
 Issue 660357  has been merged into this issue.

Comment 48 by michael....@googlemail.com, Nov 3 2016

Great work. Which stable version will contain the fix?

Comment 49 by vasi...@chromium.org, Nov 3 2016

Looks like 55 (on Beta channel already).

Comment 50 by vabr@chromium.org, Nov 3 2016

The two fixes are both in 55.0.2883.35.

Comment 51 by markadam...@gmail.com, Nov 3 2016

Has that version been released?

Comment 52 by vasi...@chromium.org, Nov 3 2016

It's current beta version.

Comment 53 by cr...@bluesix.com.au, Nov 17 2016

Can confirming it's working in v55 Beta. (dead in v54)

Comment 54 by sderen.c...@gmail.com, Nov 22 2016

does it fixed ? when will release

Comment 55 by jdoerrie@chromium.org, Dec 12 2017

Cc: jdoerrie@chromium.org
 Issue 672421  has been merged into this issue.

Comment 56 by vabr@chromium.org, Nov 29

Cc: -vabr@chromium.org

Sign in to add a comment