Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 6

Qt-interest Archive, April 2007
QMainWindow: slow resizing on windows


Message 1 in thread

The resize performance on my QMainWindow-derived widget is terrible.  
Using Qt 4.2.1 on XP, with Visual Studio .NET 2003 Professional.

Initially, I thought this was my problem. I spent the weekend pouring  
through my code, making sure that all my widgets were behaving  
nicely. I could not find a problem with any of them, so I turned my  
attention to Qt itself. I ran the 'mainwindow' demo program that  
ships with Qt, and lo and behold -- it exhibits the very same  
problem.  Resizing the window frame is noticeably slow and 'jerky',  
as if the paint events are taking much too long. I know that QPainter  
is improved in Qt4, so I'm fairly certain that is not the bottleneck.  
I ran a profiler on the code (while constantly resizing the window),  
but it did not reveal anything worth reporting. Perhaps it is the  
event dispatching? Or something specific to QMainWindow and its  
internal layout scheme? It was at this point in my investigation that  
I've decided to ask the list.

I've searched high and low for information on this apparent problem,  
but I could not find much of anything (using google, or searching qt- 
interest or tasktracker).

I have two requests: if anyone has any information on this problem, I  
would appreciate hearing it.

In addition, can someone please compile and run the 'mainwindow' demo  
application with qt 4.2.x, and let me know what the resize  
performance is like? By way of comparison, the qt 3.x versions of the  
same thing are close to an order of magnitude faster. Other windows  
applications (firefox, explorer, paint shop pro, etc.) also perform  
acceptably well.

Why is qt 4.2.x lagging behind when resizing?

db

--
 [ signature omitted ] 

Message 2 in thread

On Apr 23, 2007, at 3:36 PM, Dave Berton wrote:

> In addition, can someone please compile and run the 'mainwindow'  
> demo application with qt 4.2.x, and let me know what the resize  
> performance is like? By way of comparison, the qt 3.x versions of  
> the same thing are close to an order of magnitude faster. Other  
> windows applications (firefox, explorer, paint shop pro, etc.) also  
> perform acceptably well.
>
> Why is qt 4.2.x lagging behind when resizing?

I've gone back and forth with Trolltech support on this, and  
apparently there will be no fix for this in 4.3.

What I am interested in now is other people's impressions of this  
problem. For windows developers out there, is the resize performance  
of the 'mainwindow' demo program acceptable in any 4.2.x release or  
the 4.3 snapshot? IMO, it is an order of magnitude slower than qt3.  
Granted, it uses double-buffering automatically (a QPainter  
improvement) however the net result is that the overall painting  
performance of widgets (especially during resize operations) is quite  
bad, to the point that regular users notice the problem. So, can  
anyone try this and give me your impressions?

Thanks.

db

--
 [ signature omitted ] 

Message 3 in thread

On 25.04.07 08:37:38, Dave Berton wrote:
> 
> On Apr 23, 2007, at 3:36 PM, Dave Berton wrote:
> 
> >In addition, can someone please compile and run the 'mainwindow' demo 
> >application with qt 4.2.x, and let me know what the resize performance is 
> >like? By way of comparison, the qt 3.x versions of the same thing are close to 
> >an order of magnitude faster. Other windows applications (firefox, explorer, 
> >paint shop pro, etc.) also perform acceptably well.
> >
> >Why is qt 4.2.x lagging behind when resizing?
> 
> I've gone back and forth with Trolltech support on this, and apparently there 
> will be no fix for this in 4.3.
> 
> What I am interested in now is other people's impressions of this problem. For 
> windows developers out there, is the resize performance of the 'mainwindow' 
> demo program acceptable in any 4.2.x release or the 4.3 snapshot? IMO, it is an 
> order of magnitude slower than qt3. Granted, it uses double-buffering 
> automatically (a QPainter improvement) however the net result is that the 
> overall painting performance of widgets (especially during resize operations) 
> is quite bad, to the point that regular users notice the problem. So, can 
> anyone try this and give me your impressions?

I don't notice any slowdown between Kate/KDE4 and Kate/KDE3 here on my
Linux box. I don't have a Qt3 on windows so I can't compare that, but
IIRC Qt4 on my windows box didn't show any slow resizing either. (that
was qt4.3 beta)

Andreas

-- 
 [ signature omitted ] 

Message 4 in thread

Dave Berton wrote:
> 
> On Apr 23, 2007, at 3:36 PM, Dave Berton wrote:
> 
>> In addition, can someone please compile and run the 'mainwindow' demo 
>> application with qt 4.2.x, and let me know what the resize performance 
>> is like? By way of comparison, the qt 3.x versions of the same thing 
>> are close to an order of magnitude faster. Other windows applications 
>> (firefox, explorer, paint shop pro, etc.) also perform acceptably well.
>>
>> Why is qt 4.2.x lagging behind when resizing?
> 
> I've gone back and forth with Trolltech support on this, and apparently 
> there will be no fix for this in 4.3.
> 
> What I am interested in now is other people's impressions of this 
> problem. For windows developers out there, is the resize performance of 
> the 'mainwindow' demo program acceptable in any 4.2.x release or the 4.3 
> snapshot? IMO, it is an order of magnitude slower than qt3. Granted, it 
> uses double-buffering automatically (a QPainter improvement) however the 
> net result is that the overall painting performance of widgets 
> (especially during resize operations) is quite bad, to the point that 
> regular users notice the problem. So, can anyone try this and give me 
> your impressions?
> 
> Thanks.
> 
> db
I compiled the mainwindow application in the open source version of Qt 
4.2.3 on a Windows machine (XP, SP2, 2.5 GHz Pentium with 512 GB ram) 
using MinGW. I also tested some of my applications. The Qt widgets to 
take longer to fill after a resize. What I observed was that the desk 
top was visible for a moment after an increase in window size and the 
scrollbars shrink or disappear for a moment after a decrease in window 
size. The duration of the effect seems to depend on how much drawing is 
needed to fill in the widgets. I didn't see these effects with Firefox. 
However, on my machine, the effects were visible, at most, for much less 
than 1 second. None of my users have mentioned this.
> 
> -- 
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
 [ signature omitted ]