Load Times & showing a "loading graphic"

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
saetrum
Quite a regular
Quite a regular
Posts: 55
Joined: Wed Jan 12, 2005 12:06
Location: Albuquerque, NM USA

Load Times & showing a "loading graphic"

Postby saetrum » Mon Apr 11, 2005 14:27

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!
There are 10 types of people in the world: those that understand binary and those that don't.

User avatar
rincewind
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06

Re: Load Times & showing a "loading graphic"

Postby rincewind » Mon Apr 11, 2005 20:45

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

User avatar
saetrum
Quite a regular
Quite a regular
Posts: 55
Joined: Wed Jan 12, 2005 12:06
Location: Albuquerque, NM USA

Re: Load Times & showing a "loading graphic"

Postby saetrum » Tue Apr 12, 2005 18:43

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.
There are 10 types of people in the world: those that understand binary and those that don't.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Load Times & showing a "loading graphic"

Postby lindquist » Tue Apr 12, 2005 22:29

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.

User avatar
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

Re: Load Times & showing a "loading graphic"

Postby gcarlton » Wed Apr 13, 2005 05:38

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).

User avatar
saetrum
Quite a regular
Quite a regular
Posts: 55
Joined: Wed Jan 12, 2005 12:06
Location: Albuquerque, NM USA

Re: Load Times & showing a "loading graphic"

Postby saetrum » Wed Apr 13, 2005 17:36

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?
There are 10 types of people in the world: those that understand binary and those that don't.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests