R
Richard Dale
I tried this timing test on my 800 MHz G3 iBook running Linux with Qt 3.3.4:Lothar said:One of the best things is that FOX is that it is without doubt the winner
when it comes to speed problems. Populate the FXTreeList with 10000
items in less then a second ? No problem for FOX. Odr do you want to
put up a complex form dialog in 100 ms - don't try this with QT oder GTK.
QTime before = QTime::currentTime();
QListView * table = new QListView(win);
table->addColumn( "My column" );
QString temp("My field %1");
for (int i = 0; i < 10000; i++) {
new QListViewItem( table, temp.arg(i) );
}
QTime after = QTime::currentTime();
win->show();
QTime afterShow = QTime::currentTime();
qDebug(QString("Time to load 10000 QListViewItems: %1 ms showing
QListView: %2 ms")
.arg(before.msecsTo(after))
.arg(after.msecsTo(afterShow)));
I get:
Time to load 10000 QListViewItems: 169 ms showing QListView: 2598 ms
So about 3 seconds for 10000 items. Most of that is drawing which will vary
according to different styles used, or whether running Qt on Windows or Mac
OS X.
There is an example called 'widgets' in Qt which has lots of different
widgets and is much bigger than any dialog, I changed the code to time how
long it took:
QTime before = QTime::currentTime();
MyWidgetView* w = new MyWidgetView;
a.setMainWidget( w );
QTime after = QTime::currentTime();
w->show();
QTime afterShow = QTime::currentTime();
qDebug(QString("Time to load dialog: %1 ms showing dialog: %2 ms")
.arg(before.msecsTo(after))
.arg(after.msecsTo(afterShow)));
I got:
Time to load dialog: 345 ms showing dialog: 32 ms
I not sure if you could notice the difference between 100 ms and 345 ms, but
certainly the toolkits are roughly comparable in speed. FOX probably has a
smaller memory footprint than Qt though.
That sounds pretty subjective to me. I think Qt is very well designed andAnd if you ever need to do something special, so you have to modify
the C++ source then you will see that FOX is miles ahead to GTK or
QT's internal architecture.
easy to customise. For instance, in Qt 4 you can customise the model for a
10000 item tree view, so it only loads the view from the model on a lazy
basis when the data needs to be displayed on the screen. Then your timings
above about FXTreeList wouldn't be directly comparable.
-- Richard