Because QtWebKit current decodes images in the main thread, the UI performance suffers while images are being decoded. This is particularly noticeable when examining scrolling performance of image-heavy websites.
- Decoding images in a separate thread should work with the tile-based rendering in QtWebKit. Once images are decoded, tiles to which they belong should be updated.
- It is sufficient to only decode images for which the width/height attributes or CSS style properties are specified in a separate thread if that simplifies layout process.
Adding myself as CC.
Please also investigate the use of the DSP.
(In reply to comment #0)
> - It is sufficient to only decode images for which the width/height attributes or CSS style properties are specified in a separate thread if that simplifies layout process.
This should be fine. For most (all?) image formats, we get the geometry from reading the header which is done via separate API.
Is somebody working on this? If yes, please put her/him as assigned.
I was given some thoughts about this some time ago.
Here's what I still remember:
We currently don't do progressive image decoding (AFAIK), so it should be fine to move the data to the other thread when the image has finished loading.
Also there is probably some file size minimum from that it makes sense to do the work in the thread, e.g. the thread overhead is unimportant for bigger images so for those it makes sense to use a thread.
Also I have this in my notes file:
virtual void RenderImage::imageChanged(WrappedImagePtr, const IntRect* = 0);
My thoughts were maybe that this could be called from the decoder thread or something. No idea :) Too long ago.
*** This bug has been marked as a duplicate of bug 69515 ***