[Qt-qml] Plead for the cached Text
Juha Turunen
turunen at iki.fi
Fri Jan 21 02:03:51 CET 2011
Hi all,
(If this sounds like a rant, it's really not.)
after months of waiting and painful infix building we finally got
QtSDK TP 1.1 for Symbian. Yay, what a day of joy! I quickly (no pun
intended) installed the new runtime to my test devices, started a test
app and suddenly didn't feel so happy anymore. The reason was that the
text rendering had taken a pretty bad hit.
I'm speculating that the reason for this is the fix to:
http://bugreports.qt.nokia.com/browse/QTBUG-14050 (TL;DR: Text element
used to draw itself to a pixmap and then just draw the pixmap when
animated)
I understand completely the reasoning for the fix (I even reported the
same issue when I noticed that big lumps of text don't work at all,
but failed to see the implications of the change), but I don't think
this cuts it either. My test app which has about two screenful of
items (on a 640*360 screen) used to run really nice on the current
Symbian^3 hardware, but now the wow effect is pretty much gone,
because the scrolling stutters. It's not just the drop in the
framerate, but the real issue is that the framerate is inconsistent
and that looks horrible. I guess this is because on different frames
different amount of text gets drawn (varying line lengths, gaps
between the items containing the text, etc)? On top of that applying
transformations on Text items kills the performance completely and the
framerate is something like 5fps (it used to be 30fps+ and kept
getting better when less and less pixels were drawn by the GPU).
I can live without transformations, but not without smooth scrolling.
I know GPU memory is a scarce resource (~20MB left after boot on the
current S^3 hardware), but noone (at least of the consumers who pay
money for the stuff we make) really cares about how many apps you can
run at a time if that single one isn't meeting the expectations set by
the competition (iOS).
Would it be possible to take the middle way and make the caching of
the rendered text optional (preferably so that you explicitly opt
out)? That way we could have both faster and more stable framerates
with caching (when it makes sense) and bigger bodies of text with no
cache (could be forced to no-cache if dimensions of the painted area
reach some limit). If the caching was a property of Text it could be
used to also purge the cached text when it's not needed. Re-rendering
it won't take that long anyway when it's needed again. In my test app
the two screen of items the actual text occupies the area of maybe
50%-60% of those two screens. That totals about ~1MB of GPU memory -
5% of the amount available if nobody else is hogging it. Multiples of
that can easily be spent on loading multiple background images, etc.
In the next iteration of Symbian hardware there will still probably be
a separate GPU (to keep the door open for chipsets without an
integrated GPU) with no UMA, but likely a double the amount of GPU
memory. So it might not even be that big problem in 2012 - stuttering
scrolling though is a problem in 2011.
I hope this issue will get some attention and possibly a fix before
QtQuick goes big and OviStore deployable. I can of course implement my
own Text item that behaves exactly like I want it to, but it would be
really sad to see everyone (who is even aware of the issue) to jump
through hoops to get where we should already be in this market.
In case the problem is somewhere else and already fixed: "I'll get me coat" :)
Juha
More information about the Qt-qml
mailing list