[Interest] Qt Performance : QT Widget Application vs WPF

Chandralatha Harish chandralathadc at gmail.com
Tue Mar 10 07:49:42 CET 2015


Hi All,

I was trying to evaluate QT vs WPF in terms of Memory , Performance ,
Window HAndles, User objects, GDI and so on..
So built 2 identical looking controls in WPF and QT with all values
harcoded.
BAsically a usercontrol - which is "QFrame holding 3 Labels with text, 3
labels with Images, 3 combo box, "
and created the usercontrol in a loop of 100, 200 ,1000 , 10000 and so
on... with the button click on the main window,
The code in QT is as follows...

void MainWindow::on_pushButton_clicked()
{
QElapsedTimer myTimer;
myTimer.start();

for(int i=0;i<100;i++)
{

QListWidgetItem *item=new QListWidgetItem(ui->listWidget);
UserControl *row=new UserControl (0);
item->setSizeHint(row->maximumSize());
ui->listWidget->setItemWidget(item,row);
}
 ui->timeLabel->setText( QString::number(myTimer.elapsed())+ " ms");

}

On Measuring the performance, with the above code in QT (vs WPF with very
identical code in WPF)
-> First of all in QT,I could notice a lot difference in performance
measure between the debug build vs release build of QT( say if release
build take 1.3 sec to create 200 controls debug build takes around 7 sec)
--> On creating 100 and 200 user controls the performance measures of WPF
were identical to performance measures of release build in QT.
--> but on increasing the loop size, i noticed QT performance was pretty
bad w.r.t to WPF.
for 1000 UserControls- WPF took - 7sec( creation + render time) and 137 MB
of memory
while QT took - 15 sec(creation+render time) and 147MB of memory

for 10,000 usercontrols- WPF took - 79sec and 1 GB memory
QT took - 22 mins for creation and rendering and 1GB of memory
Note: Each UserControls Contains around 9 controls
Can some one comment on
-> Is QT Performance bad compared to WPF for huge number of controls?
-> Is it the issue with the Rendering engine used by default. I'm using QT
5.4 64 bit Open source version of QT.
-> the below states QT native rendering suffers with Performance issues -
and Raster graphics to be used
https://kjellkod.wordpress.com/2011/05/22/moving-to-qt5-will-that-remove-qts-performance-issues-on-linux/
How to switch to Raster Graphics inQT 5? Understand that
QApplication.SetGraphicsSystem has been deprecated in QT5.
--> Is QT Quick better vs Widget application in terms of performance?

Thanks in Advance,
Latha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150310/4ec74b2b/attachment.html>


More information about the Interest mailing list