amirpc
amirpc

Reputation: 1668

webkit performance analysis on image resizes

Doing performance profiling using the chromium tracing panel I've found many image resizes, especially on scroll.

I've removed all (I think) of the image resizes from the front-end, and simplified the dom for testing purposes to be mostly just static image elements at this point.

I have a few theories:

  1. All images resize/resample internally
    • looking at the chromium source, I've found evidence that everything is calling "NativeImageSkia::resizedBitmap"
  2. Using a retina display mac causes the images to be sampled up
    • This is backed up by seeing a "dst_pixels" size 4x the src_pixels in the tracer

Can someone confirm or deny any of the above?

Also:

Is it possible to track down which image is being resized?

enter image description here

Upvotes: 4

Views: 570

Answers (1)

amirpc
amirpc

Reputation: 1668

After working with some of the guys at google I've determined that this is in fact a webkit bug related to the handling of the high PPI monitors on the retina macbook pros.

You can see on a non-retina display (same mac, external monitor) there are only "Image Decode" events. Same content, same mac, rendered on the retina display you can see there are both "Image Decode" and "Image Resize" events.

Tested with 24 and 25.0.1329.0

Non-Retina Display Retina Display

Also, it is currently not possible to find out what image is being resized from the runtime instrumentation in chrome.

Upvotes: 7

Related Questions