PDA

View Full Version : QTableView Performance Problem on Windows



umitoz
31st August 2007, 09:05
Hello,

I'm developing an application largely based on readonly tables with dynamic content. I use primarily Linux as my development platform. I've implemented MVC pattern, added some cache logic for data() method of model (data is retrieved from remote servers dynamically). Everything is running smootly on Linux; scrolling up and down is fast, scrolling left/right is again fast for either pixel based or item based scrolls.

However, when I tried the very same code on Windows, especially the up/down scrolls are too slow on the same hardware. I tried on two other Windows machines, the result was the same.

I don't know what causes this huge performance difference, but I observed the following:

Think about a readonly table containing 100 rows and 20 columns with texual data. On my screen, say only 20 rows are displayed at a time. On linux when I reach the bottommost displayed row and press down key, it seems bottom 19 rows are immediately copied (drawn) to 1 row upper position and model is only queried for the new bottom row. However on Windows, it seems like Qt queries 20 rows of data and repaints each cell again.

Any ideas how to optimize this :confused: ? I hope that I could express the problem clearly.

Regards,
Umitoz

umitoz
31st August 2007, 16:47
Forgot to say that I'm using Qt 4.3.1, I've also tried 4.3.0 with no success.