PDA

View Full Version : QPlainTextEdit performance in Qt 4.7.0



Carlsberg
2nd March 2011, 13:40
I have some huge data sets that can have 500k or more lines of text. I keep those as a list of QByteArray.

To navigate through them I use a QPlainTextEdit as a viewport, it only shows about 50 lines at once. This viewport is controlled by some custom scroll bars.

Now the problem is with the vertical scroll bar. Using Qt 4.5.1 I can have let's say 500k lines and I can smoothly and very fast drag the vertical scrollbar through all content.

Using Qt 4.7.0, on both VS and MinGW, the dragging is very sloppy, like the scroll indicator is struggling :)

I've narrowed down by comenting stuff in my update method and it all comes to this


m_viewport->setPlainText(dataBuffer);

dataBuffer is just a QByteArray containing about 50 lines of data.

Does anyone know something about this issue?

Thank you

Carlsberg
3rd March 2011, 08:57
Happens the same on 4.7.2. So, compiled with 4.5.1 it's lighting fast, compiled with 4.7.0 and 4.7.2 it's amazingly slow :)