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

Issue 630774 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 630674



Sign in to add a comment

Image decodes cause 500ms stall in AMP viewer carousel reduction

Project Member Reported by dglazkov@chromium.org, Jul 22 2016

Issue description

Step to repro:

1) Go to http://jsbin.com/cowiye/6/quiet on Nexus 5/5x/6/6p/etc.
2) Start tracing
3) Click "Go" button
4) Wait until all 6 frames loaded

Sample trace is here: https://drive.google.com/open?id=0B0w8IQeoE99FdUlPX3h3ZEVXSFU
 
There might already be a bug on this, please dupe if necessary.

Comment 2 by vmi...@chromium.org, Jul 23 2016

This is a case that could be helped by image checker-boarding, and other 'async' rendering ideas.

I'd like to understand the use in AMP better.  This test loads each iframe directly in the visible view which makes them blocking.  Doesn't AMP's carousel pre-load iframes off screen (giving us a chance to pre-load this kind of image)?
AMP does preload iframes, which would help a bit. This is definitely a slightly more exaggerated case. However, you can probably see a user trying to swipe left-left-left and then hitting the preload limit.

Also, the preload still happens on the main thread, which means that they could contribute to jank.

Yeah, you're right, checkerboarding is probably the right final resting place for this type of problem.

Comment 4 by vmp...@chromium.org, Jul 23 2016

Components: Internals>Compositing>Images
The image decodes do take a while which we can help by preloading images or frankly using smaller images :) In one of my traces, I saw that these were 3264x2448 images, which just takes a while to decode. Image checkerboarding would help here, but then you'd just see a smooth animation but no image which will appear later (I think that might be better, but maybe there are cases where that would be more jarring)

This does seem to be performing relatively OK in that it isn't decode the image every frame, but just when the image first appears.

Also this trace doesn't look bottlenecked on raster, but rather GPU is swamped. Or am I misinterpreting the trace? It seems like the flush takes a while (70ms or so)
I defer to you on any judgement around what's happening. I begin to look pretty ignorant as soon as I exit third_party/WebKit and content/renderer :)

Comment 6 by vmi...@chromium.org, Jul 23 2016

> Also this trace doesn't look bottlenecked on raster, but rather GPU is swamped.

The trace had GPU framebuffer snapshotting on, so it's bottlenecked by that.  With that removed I think GPU is fairly cheap; the two image decodes are part of the janks, but also the main thread work is ~100ms during that time as well.

Comment 7 by flackr@chromium.org, Jul 27 2016

Can this bug be closed given comment #6?

Comment 8 by flackr@chromium.org, Jul 27 2016

Owner: vmi...@chromium.org
Status: Assigned (was: Untriaged)

Comment 9 by vmi...@chromium.org, May 10 2017

Owner: vmp...@chromium.org
I think the GPU was swamped due to constant snapshotting, but the original issue of image decoding blocking for a long time remains.

vmpstr@, over to you for reducing image decoding to 0ms.
Looks like both images are jpeg. The async & checkerboarding will help the jank, like Vlad said. But the actual decode time will also improve with the move to SkJpegCodec.

Sign in to add a comment