CEGUI/Ogre Performance

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

danto
Just popping in
Just popping in
Posts: 4
Joined: Tue Jan 01, 2008 17:03

CEGUI/Ogre Performance

Postby danto » Tue Jan 01, 2008 17:08

'm having some severe performance issues with CEGUI/Ogre and I'm not sure why. I'm working on an editor application for my game and I'm discovering some issues with CEGUI.

Here is the UI I have:

Image


In that image I'm currently running at 25 fps. When I first load into the editor that Object Creation window is not there and I'm running smoothly at over 1000 fps. As soon as I load up that window it crashes down to between 20-25 fps. If I move the mouse over the window or drag the window it slows down to 12-16 fps. I'm using the latest Ogre and have compiled from source. I've also compiled CEGUI from the lateset source as well. I'm not sure why I'm getting such bad performance. I can't even move the window without it stuttering like crazy. Any ideas?

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Wed Jan 02, 2008 02:25

The standard reply is to run the application in a release rather than debug compile.

A potential problem could be that you are calling setText() or any other Cegui method to update the Cegui widgets every single frame. This essentially bypasses the Cegui cache, requiring a lot of processor to process every bit/detail that makes up each widget; the image of the widget itself and any text/images it may contain. The current version of Cegui does not check whether the setXXX() function is called with an unchanged value, you have to perform this test yourself.

Hope this helps.

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

Postby daves » Wed Jan 02, 2008 16:05

We are using cegui/ogre as well. Please let us know if, indeed, you were looking at performance in debug mode. To Rackles point there is a LOT of debug structure and applications will not run at high performance if debug is turned on.

In general, our application is a resource intensive application that is doing a LOT of graphics both within ogre and within cegui. We have seen reasonable performance though we do not look at performance as measured in FPS, rather we look at performance in terms of the number of objects that we can render with a reasonable update rate to each object.

Of the various objects that we render within a scene some are static, some are mobile. To Rackles point it is important to develop an architecture such that updates to objects are made only as needed (e.g. some visual attribute associated with the object changes). In our application this typically requires object updates (to potentially thousands of objects) on a roughly once per second basis (as opposed to a per-frame basis).

danto
Just popping in
Just popping in
Posts: 4
Joined: Tue Jan 01, 2008 17:03

Postby danto » Wed Jan 02, 2008 22:03

I'm running CEGUI in release mode. After double checking what Rackle mentioned I changed how I update my fps counter and noticed a dramatic increase in performance as I was doing setText every frame. Now I had put in my fps counter specifically because I was noticing some slow downs...not as dramatic as outlined above, but it felt sluggish when dragging the window around.

After making some changes to my code the framerate counter is not updated every frame, but only when there is a change in framerate. After doing it this way I am getting over 50 fps even when moving my window. From a framerate standpoint I'm ok with this, but even with this framerate it feels sluggish when moving the window around and not as smooth as I would expect. Are there any other considerations or options in CEGUI that I could possibly change or eliminate to up performance? Thanks for the feedback.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Wed Jan 02, 2008 22:33

danto wrote:feels sluggish when moving the window around


This is a different problem; I seriously doubt that the cache is flushed when moving a window around. What may happen is that the mouse behaves as if it was moving around freely. In that situation Cegui checks whether the mouse cursor enters/leaves (starts/stops hovering over) a widget. This requires checking for the window under the cursor, which may be the culprit here. However I do not really know, it's just a hunch. A search on "window move" (move/moving/movement/dragging) may reveal information on this.

danto
Just popping in
Just popping in
Posts: 4
Joined: Tue Jan 01, 2008 17:03

Postby danto » Sat Jan 05, 2008 18:33

Well after spending some more time and doing some more troubleshooting it appears to be an issue with my skin. I'm not sure yet what the trouble is but I swapped out my skin for the TaharezLook skin for my editor and it ran smooth as silk. I'll spend some more time tracking down what it is in my skin, but it definitely is a skin related issue.

danto
Just popping in
Just popping in
Posts: 4
Joined: Tue Jan 01, 2008 17:03

Postby danto » Sat Jan 05, 2008 20:18

Looks to be fixed. On my FrameWindow setup in my looknfeel file I changed the vertFormat and horzFormat to Stretched instead of tiled. The edges are a lot smaller then what the taharez skin uses so apparently the tiling of that small edge was seriously eating up the framerate. After putting it to stretched instead of tiled my framerate has shot way up and is now reacting as I would expect. Thanks to those who helped on this matter. :)

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Thu Jan 10, 2008 17:51

I had the same, I took a 1-pixel image as background for a FrameWindow and put it in as "Tiled", it was slooooooooooooooow. I then changed this to "Stretched" and it was much better.

Just for reader's information :)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 26 guests