Page 1 of 1
Load Times & showing a "loading graphic"
Posted: Mon Apr 11, 2005 14:27
by saetrum
Hi all,
1st off - Sorry to see you go CE. Your work was greatly appreciated.
Ok, now on to the issue at hand:
I have several .layout files for the program I have been creating. Initially, I was loading these as needed, however that was adding in a longer delay at inopportune moments, so I decided to load all the .layout files during the initialization of my program, figuring that a user would be more patient at startup than having delays during use of the program. Currently the loading time is about 10 - 15 seconds and I imagine it will get worse as I add more layouts. My question is: Is there any way to reduce that loading time? and/or is there a way to get the progress of the current file, so I can create a loading screen and give info to the user?
Thanks!
Re: Load Times & showing a "loading graphic"
Posted: Mon Apr 11, 2005 20:45
by rincewind
The load times are probably due to the texture creation for the imagesets.
If you are using the Ogre-Renderer, you can most likely use it's ResourceManager callback functionality to get an update on each resource (read texture) load. If you then change your scene (that is loading screen) accordingly and rerender the rendertarget, you should be able to make a loading screen.
There's also support for real asynchronous loading but I don't know how well that plays with CEGUI.
Rincewind
Re: Load Times & showing a "loading graphic"
Posted: Tue Apr 12, 2005 18:43
by saetrum
Believe it or not, the slowest loading is the .layout files. I have a couple that are pretty big.
I will have to look into the asynchronous loading, but I'm not sure it will work (as you mentioned) since it is the window manager that is doing the loading.
Thank you for the suggestions, I'll see what I can figure out. If you think of anything else, I'd be happy to hear of it.
Re: Load Times & showing a "loading graphic"
Posted: Tue Apr 12, 2005 22:29
by lindquist
Hi.
I have'nt really tested anything, but I could imagine that using the tinyxml parser for the XML would speed it up.
Also make sure you're not using a Debug build.
Re: Load Times & showing a "loading graphic"
Posted: Wed Apr 13, 2005 05:38
by gcarlton
CVS now has an improvement to the tinyxml that should speed up loading by eliminating a fair amount of stupid allocs. Apart from that, the only real improvement would be to use an memory pool to draw the tinyxml allocs from.
In terms of a loading gui, the easiest solution would be to load your "loading" dialog and then display it, and update it between every layout that you load. That should also give a rough indicator for the gui (use 8/25 layouts loaded for the progress bar).
Re: Load Times & showing a "loading graphic"
Posted: Wed Apr 13, 2005 17:36
by saetrum
I'll have to try the newest CVS out. I'm using a version from late Feb, so that may be adding to the delay.
Thanks!
About TinyXML, is there something I have to change to be able to use it? or is it the default for CEGUI?
Also I have a single function doing all the loading. When I tell the progress bar to step between each loading step. The change is not visible on the screen (I assume it is not causing a redraw to happen. Is there a way to force a redraw?