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

Issue 812180 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug-Regression



Sign in to add a comment

chrome://settings/changePicture processes images on the UI thread

Project Member Reported by mmanchala@chromium.org, Feb 14 2018

Issue description

Chrome Version: 66.0.3344.0/10401.0.0 dev-channel Reks,Kip and Daisy
OS: Chrome

What steps will reproduce the problem?
(1)Sign in to user -> Go to camera App -> take a picture  and now save the picture to disk(Saved with .jpg extension in Files App)
(2)Go to chrome://settings/changePicture page -> Select 'Choose a file' option -> Now select captured picture from Files App
(3)Observe weird behavior after choosing picture
(Please refer Video)

Expected: No such weird behavior should be seen
Actual: Instead  weird behavior is seen after choosing picture from Files App

This is Regression Issue as same is working fine in  64.0.3282.167/10176.72.0  Stable-channel Daisy

Note: 
1.Issue is also seen on 65.0.3325.67/10323.31.0
2.Issue is working fine in M-63

@stevenjb : Please confirm the Issue
 
Actual_Behavior.webm
4.1 MB View Download
Expected_Behavior.webm
1.8 MB View Download
Cc: steve...@chromium.org
Labels: -Pri-1 Pri-2
Owner: reve...@chromium.org
Could you describe the "weird behavior" so that we do not necessarily need to watch the video?

Removing "Regression" since this has been around since 64. I also doubt this is a P1.

Summary: Weird behavior is seen after choosing captured picture from Files App in chrome://settings/changePicture page (was: Regression : Weird behavior is seen after choosing captured picture from Files App in chrome://settings/changePicture page)
Also, is the behavior specific to files captured from the camera app, or does it occur with other similarily sized files?

Owner: mmanchala@chromium.org
I watched the video but I still have no idea what "weird behavior" is referring to.
Repro steps:
(1)Sign in to user -> Go to camera App -> take a picture  and now save the picture to disk(Saved with .jpg extension in Files App)
(2)Go to chrome://settings/changePicture page -> Select 'Choose a file' option -> Now select captured picture from Files App
(3)Observe delay is seen after choosing picture
(Please refer Screenshot)

C#3>
Yes, Issue is seen with files captured from the camera app

C#4>
Delay is seen after after choosing picture and transparent 'Select a file to open' window is seen (Please refer Screenshot)
Actual_Behavior.png
174 KB View Download
Owner: steve...@chromium.org
Cc: reve...@chromium.org
Components: Platform>Apps>FileManager
Labels: Needs-Feedback
Owner: fukino@chromium.org
Status: Untriaged (was: Assigned)
re comment #5:
So the "weird behavior" is the dealy after selecting the file (from 0:28 until 0:30) where a translucent dialog image is still visible? Pease confirm.

re: re: comment #3:
The question was, does the issue *only* occur with files captured from the camera app, or does it occur with any file?

This sounds like an issue with the file select dialog and not the Settings UI. -> fukino@

It could also be a window manager issue, please reassign to oshima@ if that appears to be the case.


Labels: -Needs-Feedback
C#7>
1)Yes after selecting the file a translucent dialog image is still visible (from 0:28 until 0:30)

2)Yes Issue is seen with files captured from the camera app only.
I tried with downloaded images( .jpg extension )and with Screenshot files(.png extension) but unable to repro the issue

Thanks..!!
Ok, I understand what 'weird behavior' is referring to now. This is not really specific to the change picture page. It's a general issue where the main UI thread is blocked for some reason and can't produce the frames needed to run animations at the expected speed (fade out animation for dialog in this case). That can happen for a number of reasons.

In this case, it seems like the loading of images will sometimes result in processing on the main browser thread that takes a long time. Not sure what that processing is yet. However, you can see the main browser thread being busy in a trace. I haven't found a trace event that explains what this processing is yet but it shouldn't be hard to track down.

We should fix this by either eliminate the processing or moving it off the main thread.
Labels: CrOS-FilesApp-UI
Status: Assigned (was: Untriaged)
Managed to capture a trace of the problem. See attached screenshot.

Problem is that UserImageRequest::OnImageDecoded is blocking the main browser thread. 350ms on my i7 pixelbook. That will likely be more than a second on a slower machine:
https://cs.chromium.org/chromium/src/chrome/browser/chromeos/login/users/avatar/user_image_loader.cc?l=146

As you can see in the trace, GetBitmapDataUrl is part of that cost:
https://cs.chromium.org/chromium/src/ui/base/webui/web_ui_util.cc?l=35

These expensive operations needs to be moved off the main thread.
bad-browser-main-task.png
98.9 KB View Download
Labels: -CrOS-FilesApp-UI CrOSFilesCategory-UI
Labels: -Pri-2 Pri-3
Labels: -M-66 M-67
Moving to M-67, please update if incorrect.
Cc: fukino@chromium.org
Labels: -M-67
Owner: ----
Status: Available (was: Assigned)
Labels: Hotlist-MD-Settings-ChangePicture
Components: -Platform>Apps>FileManager
Labels: -CrOSFilesCategory-UI
Summary: chrome://settings/changePicture processes images on the UI thread (was: Weird behavior is seen after choosing captured picture from Files App in chrome://settings/changePicture page)
From #11 and #12, this is not files app.

Sign in to add a comment