[webkit-qt] Performance regression in the image_cycling

Holger Freyther zecke at selfish.org
Tue Mar 9 07:00:06 PST 2010


Holger Freyther <zecke <at> selfish.org> writes:

>
> One iteration on the test went from 38msec to 104msec. It would be nice if 
> someone could confirm this measurement.

Hi All,

I managed to make Simon try the reduction and he was not able to reproduce
the results I was seeing. I ran my test against the Qt 4.7 of the 2nd of March
and still was seeing numbers in the hundreds. So I started to nuke the build
tree and was compiling todays public Qt4.6 and Qt4.7 and build them. Both
deliver times around 43 msec. So I have no explanation of why my Qt 4.7
build showed these bad numbers.


This is still slower than Qt with a more simple patch to stop decoding once
the size is available and we have some issues left for ImageDecoderQt.cpp
with Qt 4.7. I wrongly assumed that a image decoder implementing the
image count would be able to jump to a given image, the Qt gif decoder
does not and the maintainer does not want to implement it. This means
someone will need to add error checking to the jumpToImage calls in the
ImageDecoderQt.cpp and then force everything to be read. Another option
would be to just not call image count function and avoid the jumpToImage
calls completely and force loading everything right away.

Currently the ImageDecoderQt.cpp only works with the gif decoder by
accident as we call jumpToImage with the frame number that we are
currently at anyway. I assume that this will show up as broken for big
animations where WebCore is throwing away frames and we want to
decode earlier frames again and use the same image decoder.

So the best way would be if the QGifHandler could be changed to not
only index the frame sizes (which we don't really care for) but also the
start of each index, the disposition mode and support jumping to the
image. In case of different disposition methods it would need to decode
earlier frames but they should be present as WebCore will access the
frames in linear and ascending order.

So sorry for some part of the noise, and thanks to Simon for testing it
and making me recompile, I hope that people at Qt DF could continue
looking at this... specially as the ::imageCount was implemented on
demand of QtWebKit but we can not make good use of it right now.

thanks





More information about the webkit-qt mailing list