Much time for creating some comboboxes....

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
vinnythetrue
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Wed Aug 10, 2005 10:29

Much time for creating some comboboxes....

Postby vinnythetrue » Tue Oct 25, 2005 08:06

Hi all, I'm currently using CEGUI under the ogre renderer and I'm getting problems with comboboxes that take real long time to create (about 2 sec sometimes).
Let me draw the situation :

- The very combos are in fact created dynamically when the user clicks a specific button.
- In fact, there's a list of these buttons, so the combo list varies from one button to another
- The problem seems to appear when I recreate a combo that where already been existing :
when the user clicks button A combos associated to A are created, then if he clicks on button B these combos are destroyed and new ones are created, then if the user comes back to A the widgets associated to A are recreated.
And it seems that the latency happens when widgets are recreated.

Someone know something about my problem ? How could I optimize it ? Does this happen only with heavy widgets such as combos ? (there's a bunch of textitems too, their creation is fast in every cases)

thanks for any help :D

User avatar
martignasse
Just can't stay away
Just can't stay away
Posts: 227
Joined: Thu Apr 14, 2005 08:10
Location: Lyon, FRANCE

Re: Much time for creating some comboboxes....

Postby martignasse » Tue Oct 25, 2005 18:20

hi,

why don't you just pre-construct you'r combos and populate/bring them up when appropriate ?

User avatar
vinnythetrue
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Wed Aug 10, 2005 10:29

Re: Much time for creating some comboboxes....

Postby vinnythetrue » Tue Oct 25, 2005 23:13

Yes, obviously I thought about this method, but the point is that the number of combos for each button may severely vary, from none to a dozen or even more. So yes I could use the same combo pool for all the buttons, but this solution seems a bit ugly to me.

But Im currently making some custom widget, pretty like a combo but with some more specific features, so I'll see if creation is faster or not.

By the way, I noticed the combo (don't actually know if it's only the one from the windows look or not), displays in a quite strange way : the drop list is clipped by the same area as the combo when not dropped down, same apparently with its size...

User avatar
martignasse
Just can't stay away
Just can't stay away
Posts: 227
Joined: Thu Apr 14, 2005 08:10
Location: Lyon, FRANCE

Re: Much time for creating some comboboxes....

Postby martignasse » Wed Oct 26, 2005 16:29

The very combos are in fact created dynamically when the user clicks a specific button.
Are you creating you'r combobox hard coded or from xml layout ?

but the point is that the number of combos for each button may severely vary, from none to a dozen or even more
I don't see exactly what you mean, maybe with a screenshot...

the drop list is clipped by the same area as the combo when not dropped down, same apparently with its size...
I remenber saw on the forum (don't remenber but with a search...) that the size of the combobox widget include the list dropped down, so just give it the totale size you want(with the list dropped down, i mean).

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

Re: Much time for creating some comboboxes....

Postby gcarlton » Fri Oct 28, 2005 00:46

I have noticed a similar problem. StaticText is one of the worst offenders, probably because it has invisible background, frame, horizontal slider, vertical slider, buttons, thumbs, etc.

SkyTracks has a scoreboard and to dynamic create about 100 text and 100 images can take up to a second or more. I haven't tracked down what it is - whether its the searching for windows of the same name (to throw an exception), finding the factory, inserting into the set of names, or some TL specific initialisation. There's certainly something thats spinning around in there that shouldn't.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests