Quiloader
-
in my generic application I load into a display defined by an ui file about 100 times another ui file, while changing some properties (text or other things). This is done through the quiloader. The loading takes the first time about 80 ms and afterwards about 40 ms (due to disk caching). However doing this 100 times starting the application takes a long time about 6 seconds. This is not really nice and I wonder if there is a method to accelerate this loading. probably the time comes from the parsing of the ui buffer, that has to be done every time. By the way, loading the ui file to a QBuffer does not bring any improvement, while with the disk caching you get the same performance increase.
Any ideas to improve loading of the same structures with qioloader again and again ?
-
Hm, I do not believe the loading (if you really need that many GUI elements) could be speed up. The most logical solution would be to use a SplashScreen first, load all your GUI elements (all hidden) to the mainwindow and then remove the splash screen and display the mainwindow.
That at least will give a nice appearance to the user. But why do you need 100 GUI elements? Isn't that a bit much?
Greetz -
well, the idea is that you construct a generic ui file that will be used for data acquisition of different devices. you get for instance a display with many control devices with their values displayed differently. This is something generally used in generic systems. the device names are filled in when loading.
-
Then an easy spash screen might be the best option. It might be so that every event loop only one GUI is loaded internally.
QSplashScreen gives nice and easy possibilities ! -
Ok,
I use a spalsscreen now with a progress bar. it work fine,
thank you for the suggestion
-
You might think about doing some "lazy" evaluation here: is the user going to use all 100 different GUI pages/elements each and every time the program is run? Will they all be on the screen at once?
If not, you could think about not pre-loading any of the GUI elements, and only create them on an as-needed basis when the user calls them.
[quote author="acmezger" date="1385635696"]well, the idea is that you construct a generic ui file that will be used for data acquisition of different devices. you get for instance a display with many control devices with their values displayed differently. This is something generally used in generic systems. the device names are filled in when loading.
[/quote] -
If you found the answer, please place [SOLVED] in front of the first post.