Hello. When you create a widget with no parent, it becomes a separate window. So, you're creating 200 (native) windows and then destroy them when you put a widget in a list. Creating native controls is a very slow operation. Try passing a view as a parent for UserControl. Next, what is real usecase? I haven't seen any applications with 200 forms in a list.
Иван Комиссаров 10 марта 2015 г., в 9:49, Chandralatha Harish <[email protected]> написал(а): > 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 > usedhttps://kjellkod.wordpress.com/2011/05/22/moving-to-qt5-will-that-remove-qts-performance-issues-on-linux/ > > <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 > > _______________________________________________ > Interest mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
