Webkit performance analysis when resizing an image

Performing performance profiling with the chrome trace panel, I found many images, especially in scrolling.

I removed all (I think) the image by resizing it from the front-end, and simplified the dom for testing purposes mainly as static image elements at the moment.

I have several theories:

  • All images are resized / resized.
    • looking at the source of chrome, I found evidence that everything calls "NativeImageSkia :: resizedBitmap"
  • Using the retina display results in sampled images
    • This is confirmed by the size of "dst_pixels" of 4x src_pixels in the tracer

Can someone confirm or reject any of the above?

also:

Can I keep track of which image is changing?

enter image description here

+4
source share
1 answer

After working with some of the google guys, I determined that it was actually a web kit error related to handling high PPI monitors in macbook net profiles.

You can see on the display without a retina (the same mac, external monitor) there are only events "Image Decoding". The same contents, the same poppy displayed on the retina screen, you can see that there is both an “Image Decode” and a “Resize Resize”.

Tested with 24 and 25.0.1329.0

Non-retina displayRetina display

In addition, it is currently not possible to determine which image will change from the runtime toolkit in chrome.

+7
source

Source: https://habr.com/ru/post/1446224/


All Articles