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

Issue 802819 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug-Regression


Previous locations:
v8:7319


Sign in to add a comment

Chrome Canary has dismal scrolling - fine on 63.0

Reported by t...@percy.io, Jan 16 2018

Issue description

Version: 65.0.3322.3
OS: Mac OS Sierra

What steps will reproduce the problem?
1. Open the attached zipped html page in Canary (v65).  Observe how janky the scrolling is as you move down the page to the bottom.
2. Open the attached zipped html page in Chrome v63, observe how buttery smooth the scrolling is.

What is the expected output?
Smooth scrolling

What do you see instead?
Janky pausing stuttering scrolling

Please use labels and text to provide additional information.
scroll canary

 
Archive.zip
4.6 MB Download

Comment 1 by adamk@chromium.org, Jan 16 2018

This sounds like a chromium bug, not a v8 one; moving it to the chromium tracker for further triage.

Comment 2 by adamk@chromium.org, Jan 16 2018

Project: chromium
Moved issue v8:7319 to now be  issue chromium:802819 .
Cc: bokan@chromium.org dtapu...@chromium.org
Components: Blink>Scroll
Labels: Pri-2
Owner: sahel@chromium.org
Status: Assigned (was: Untriaged)
sahel@ can you please investigate?

Comment 4 by sahel@chromium.org, Jan 17 2018

Cc: sahel@chromium.org
Components: -Blink>Scroll Internals>GPU
Labels: OS-Mac
Owner: ----
Status: Untriaged (was: Assigned)
What I saw was regression in responsiveness rather than scrolling issue, I also saw the regression on Canary with wheel scroll latching and async wheel events disabled.

I have attached the trace from Canary. Looks like the compositor is busy doing long tasks (e.g DecodingImageGenerator::getPixels, ImageFrameGenerator::decodeAndScale). 
trace_Canary_65_busy_compositor.json.gz
1.5 MB Download

Comment 5 by piman@chromium.org, Jan 19 2018

Cc: ccameron@chromium.org
Components: -Internals>GPU Internals>GPU>Image
Owner: ericrk@chromium.org
It looks like it's spending all its time in GpuImageDecodeCache::GetDecodedImageForDraw -> GpuImageDecodeCache::UploadImage - color conversion

Something wrong with the image cache maybe?

Comment 6 by piman@chromium.org, Jan 19 2018

Status: Assigned (was: Untriaged)

Comment 7 by ericrk@chromium.org, Jan 19 2018

taking a look.
Project Member

Comment 8 by bugdroid1@chromium.org, Jan 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ec5246d62d67feb1992c0fc61add8160f5b5309c

commit ec5246d62d67feb1992c0fc61add8160f5b5309c
Author: Eric Karl <ericrk@chromium.org>
Date: Mon Jan 22 22:50:26 2018

Adjust purging of unlocked discardable in GPU Image Decode Cache

We were incorrectly purging unlocked discardable to "make room" in the
cache, although unlocked entries don't take up room. This resulted in
non-optimal cache purging when we hit at-raster scenarios.

Now that all cached items are discardable, this change removes all
purging other than that needed to handle our max items in cache limit.

Bug:  802819 ,  804328 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I5cece605bbd40283073c075e78b36867c8c7efbf
Reviewed-on: https://chromium-review.googlesource.com/879064
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531032}
[modify] https://crrev.com/ec5246d62d67feb1992c0fc61add8160f5b5309c/cc/tiles/gpu_image_decode_cache.cc
[modify] https://crrev.com/ec5246d62d67feb1992c0fc61add8160f5b5309c/cc/tiles/gpu_image_decode_cache_unittest.cc

Comment 9 by ericrk@chromium.org, Jan 23 2018

Labels: -Type-Bug -Pri-2 Merge-Request-65 OS-Android OS-Chrome OS-Linux OS-Windows Pri-1 Type-Bug-Regression
Would like to merge #8 to M65 to address this M64 regression. I don't think this is serious enough to warrant an M64 merge, as it only impacts perf when we've already hit the low-performance "at-raster" image decode path, but open to other opinions here.
How is the change listed at #8 looking in canary? 
Labels: Needs-Feedback
Tested this issue on Windows 10, Mac OS 10.12.6 and Ubuntu 14.04 on the latest Chrome build 66.0.3330.0 and below are the observations..

- On Windows 10 and Ubuntu 14.04, Can scroll smoothly through the given html page and no issues are observed while scrolling.
- On Mac OS, not able to scroll smoothly through the page and can observe blank spaces while scrolling.
Attached are the screen casts for reference.

ericrk@ Can you please check and verify if this fix is working as intended or no. 

Thanks..
802819_latestCanary.webm
11.7 MB View Download
802819_Mac.webm
5.2 MB View Download
There's an additional fix needed for the remaining mac issue that I was going land later (and request to merge separately). But I assume there's no rush for M65 (assuming I land the second fix in the next few days). Let me land that and we can confirm / merge both?
Labels: -Merge-Request-65
dropping merge-request. Will re-add it when both fixes are landed.
Labels: -Needs-Feedback
Project Member

Comment 15 by bugdroid1@chromium.org, Jan 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/79c2946a9bb6b480e623a16ed2a3bea9e87c92f1

commit 79c2946a9bb6b480e623a16ed2a3bea9e87c92f1
Author: Eric Karl <ericrk@chromium.org>
Date: Sat Jan 27 07:19:28 2018

Perform colorspace conversion for SW images in GPU cache at decode time

When caching very large images in the GPU image decode cache,
we don't upload to the GPU, but instead just cache the CPU side data
for re-use. Unfortunately, we currently perform color conversion post
upload, which means that, in the SW-only case, we end up re-converting
images on every use.

This patch causes SW-only cache entries to have their color conversion
done at decode time, ensuring we persist it in the cache.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I26831b119dffff09f977567631dd2dc7e99e7978
Bug:  802819 
Reviewed-on: https://chromium-review.googlesource.com/877106
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532185}
[modify] https://crrev.com/79c2946a9bb6b480e623a16ed2a3bea9e87c92f1/cc/paint/paint_image.cc
[modify] https://crrev.com/79c2946a9bb6b480e623a16ed2a3bea9e87c92f1/cc/tiles/gpu_image_decode_cache.cc
[modify] https://crrev.com/79c2946a9bb6b480e623a16ed2a3bea9e87c92f1/cc/tiles/gpu_image_decode_cache.h
[modify] https://crrev.com/79c2946a9bb6b480e623a16ed2a3bea9e87c92f1/cc/tiles/gpu_image_decode_cache_unittest.cc

Labels: Merge-Request-65 RegressedIn-64 RegressedIn-65
Re-adding merge request now that both fixes have landed. Would like to merge CLs in comment #8 and #15 to M65 to address an M64 regression and an M65 regression. The M65 regression is a bit worse (leads to very poor scrolling on certain sites, like the one linked in this bug).
Confirmed that these changes address the issue in Canary.
Project Member

Comment 18 by sheriffbot@chromium.org, Jan 30 2018

Labels: -Merge-Request-65 Hotlist-Merge-Approved Merge-Approved-65
Your change meets the bar and is auto-approved for M65. Please go ahead and merge the CL to branch 3325 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

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

Comment 19 by t...@percy.io, Jan 30 2018

Thank you for the rapid progress here.  I've been following each update with great interest.
tim@, thanks for reporting this bug! Glad we were able to come up with a fix.

FYI, while Chrome displays your site reasonably well with the above patches applied, your site does stress our large image path a bit. In the second set of diffs on the test site there are three very large images which are simultaneously displayed. These images take up 155MB+76MB+76MB=307MB when decoded at display resolution. This exceeds our normal cache limits (and GPU max texture sizes), making us hit less optimal paths.

While there's future work Chrome may be able to do to address this (splitting up large images into chunks for display), this is likely a ways out. I don't know how difficult this is to achieve for your app, but if simple, splitting up images into chunks with 8k max dimensions may increase performance for your site.

Either way, thanks for the report!
Project Member

Comment 21 by bugdroid1@chromium.org, Jan 30 2018

Labels: -merge-approved-65 merge-merged-3325
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7845c4435ff562dd058ec2af0d7269d73abce7a7

commit 7845c4435ff562dd058ec2af0d7269d73abce7a7
Author: Eric Karl <ericrk@chromium.org>
Date: Tue Jan 30 18:38:17 2018

Adjust purging of unlocked discardable in GPU Image Decode Cache

We were incorrectly purging unlocked discardable to "make room" in the
cache, although unlocked entries don't take up room. This resulted in
non-optimal cache purging when we hit at-raster scenarios.

Now that all cached items are discardable, this change removes all
purging other than that needed to handle our max items in cache limit.

TBR=ericrk@chromium.org

(cherry picked from commit ec5246d62d67feb1992c0fc61add8160f5b5309c)

Bug:  802819 ,  804328 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I5cece605bbd40283073c075e78b36867c8c7efbf
Reviewed-on: https://chromium-review.googlesource.com/879064
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#531032}
Reviewed-on: https://chromium-review.googlesource.com/893428
Reviewed-by: Eric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#174}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
[modify] https://crrev.com/7845c4435ff562dd058ec2af0d7269d73abce7a7/cc/tiles/gpu_image_decode_cache.cc
[modify] https://crrev.com/7845c4435ff562dd058ec2af0d7269d73abce7a7/cc/tiles/gpu_image_decode_cache_unittest.cc

Project Member

Comment 22 by bugdroid1@chromium.org, Jan 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/74c72c093cfa30c26f13ab9baa546845c3d1760d

commit 74c72c093cfa30c26f13ab9baa546845c3d1760d
Author: Eric Karl <ericrk@chromium.org>
Date: Tue Jan 30 18:44:55 2018

Perform colorspace conversion for SW images in GPU cache at decode time

When caching very large images in the GPU image decode cache,
we don't upload to the GPU, but instead just cache the CPU side data
for re-use. Unfortunately, we currently perform color conversion post
upload, which means that, in the SW-only case, we end up re-converting
images on every use.

This patch causes SW-only cache entries to have their color conversion
done at decode time, ensuring we persist it in the cache.

TBR=ericrk@chromium.org

(cherry picked from commit 79c2946a9bb6b480e623a16ed2a3bea9e87c92f1)

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I26831b119dffff09f977567631dd2dc7e99e7978
Bug:  802819 
Reviewed-on: https://chromium-review.googlesource.com/877106
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#532185}
Reviewed-on: https://chromium-review.googlesource.com/893650
Reviewed-by: Eric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#176}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
[modify] https://crrev.com/74c72c093cfa30c26f13ab9baa546845c3d1760d/cc/paint/paint_image.cc
[modify] https://crrev.com/74c72c093cfa30c26f13ab9baa546845c3d1760d/cc/tiles/gpu_image_decode_cache.cc
[modify] https://crrev.com/74c72c093cfa30c26f13ab9baa546845c3d1760d/cc/tiles/gpu_image_decode_cache.h
[modify] https://crrev.com/74c72c093cfa30c26f13ab9baa546845c3d1760d/cc/tiles/gpu_image_decode_cache_unittest.cc

Status: Fixed (was: Assigned)

Comment 24 by t...@percy.io, Feb 3 2018

@Eric thanks for the info!  We'll look at making some improvements to split larger images in the future too.

I've just tried the latest Chrome Canary, and it's dramatically improved.  Thank you!
I'm witnessing degraded scrolling performance with large images again. Did this bug creep back into newer versions of Chrome? Also happens on Chrome/Android on my Pixel 2.

Note that I'm talking about really large images (900px x 20,000px).

Scrolling performance is great in Safari.
re #25: Please file a new bug with an example URL and we can look at it there.

Sign in to add a comment