model/view (aka "interview") in Qt4 is very cool. but since it does raise the complexity bar, one of the early concerns was that interview would make development painful for simple listbox/treeview usage. trolltech listened and added widget implementations of the various views that are meant for simple use. in fact, they look a lot like the qt3 APIs. best of both worlds, right?
well, i noticed that adding items QTreeWidget in Qt4.1 was disasterously slow. the first 100 items would take ~200m which already way too slow, but it would get worse (like 0(n^2) worse) the more items one added. by the time one got to 30,000 items, it would spend over three seconds adding the next 100 items on my 1.7Ghz laptop. ouch.
some pointed out that QTreeWidget is really meant for small collections of items and anything very large probably called for a model anyways. well, i could think of a few use cases that isn't particularly true, but even then 500 items taking 1s to be added? zoinks!
ben meyer took a look at it this week, however, and things are going to be much, much better in 4.1.1. after applying his patches and re-testing, adding 100 items takes just a few ms. but even better (and more importantly), adding another 100 items even after adding 100,000 other items still only take a few ms. it's still a bit slower for this kind of worst case scenario adding insanity than the qlistview it replaces from qt3, but nothing significant. huzzah for ben and qt 4.1.1.
i'll bet there's even more such "low hanging fruit" in qt4. as matthias mentioned in a blog entry last week, the upcoming releases of qt are just going to push the bar even higher as they add not only features but performance.
in completely unrelated news, i licensed off local calgary rights to a website i wrote between 2001/2002 for finding local restaurants, clubs, bars and entertainment for a cut of revenue. the backend is designed for multiple cities, it has an integrated sales tool and a client participants site as well. but it was essentially abandoned after the guy doing sales (and my biz partner at the time) developed a nasty drug habit which threw his life down into the sewer. i was so busy with other things i couldn't devote time to getting the business side of it back up and running and, to be honest, it was a bit depressing all around.
a friend of a friend came around last fall, however, and asked if he could give it a crack. i figured, "what the hell..." who knows, maybe i'll see something for the effort i put into it one day ;)
Thursday, January 05, 2006
Subscribe to:
Post Comments (Atom)

3 comments:
Your former business partner "developed a nasty drug habit which threw his life down the sewer", and now this other friend wants to "give it a crack"? Wouldn't it be nicer to warn him away from the crack?
ba dum ching
I'm currently developing a commercial Qt 4 app. Initially I used QTreeWidget because it was familiar and MVC was new to me. I switched to model/view/controller because the QTreeWidget performance was so awful.
Performance is much better, (and the code is lovely with MVC!), but I have to say QTreeView doesn't have very good performance for scroll operations or column-resize operations yet. So I hope this will get some Qt-developer time in the future too.
Because it makes Qt look bad to my employer. All he sees is the performance issues, he doesn't see the fact that it would have taken me twice as long at least to develop what I have with some other win32-c++ solution.
Post a Comment