PDA

View Full Version : Programming practises for QT- load balancing/performance



extrakun
5th June 2009, 07:38
Hi all,

Let's say I am building a large QT application (I think there are at least 5 distinct modules, with each module having 2 to 3 property browser and a toolbar, plus about three or four more dialog boxes), what is the best way to go about achieving good performance?

1. Create and initialise all modules (each is basically a QWidget which I add to a tab) at start up

OR

2. Only create the widget the module is invoked, and destroy it (de-reference it?) when the module is closed

Is there any need to do such things, or is QT handling this under the hood?

e8johan
5th June 2009, 08:01
Creating and deleting stuff takes time, so if you can keep them, that would increase speed, but at the cost of memory. It is the classical computer science trade-off - memory vs cpu cycles.