Cache ChatLine layout data for visible chatlines
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 11 May 2010 20:56:02 +0000 (22:56 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 11 May 2010 21:00:30 +0000 (23:00 +0200)
commit77176474b628e801ba94d9d50d0d961a12aa01c4
tree541f3554cc178ccfa72ea2cfa9d4e06658f45f81
parent4875fbdd65630d336608f64d802e680d18823974
Cache ChatLine layout data for visible chatlines

Up to now, we've computed e.g. the text layout for a chatline on the fly. This
happens surprisingly often, for example whenever the mouse is moved. As a result,
moving the mouse (among other things) caused high CPU load.

We now cache such data within the chatitems until the chatline goes out of view, in
which case the cache is cleared in order to not waste space needlessly.

Fixes #954.
src/qtui/chatitem.cpp
src/qtui/chatitem.h
src/qtui/chatline.cpp
src/qtui/chatline.h
src/qtui/chatview.cpp
src/qtui/chatview.h