Hi Nikolay, and welcome :)

I'm curious about the hardware (and os) you are trying to get nui running on. It's quite fast and useable (actually we do release shrinkwrap software based on it here).

Win32: I test mainly on a 1.7Ghz Laptop with a GeForce FX 5200 which is my main dev platform.
Mac: OSX 10.3, our target machine are the PowerBook G4 1GHz and 2xG5.

I have used many tools like Shark (on the Mac) and VTune on the PC to find the bottlenecks of nui and I can tell you the tesselation is not even showing on the list of highly demanding functions. Actually GLU tesselation is quite fast but even if it wasn't every tesselated object is cached in an element list and are drawn very fast every time with calls to glDrawElements. That's the job of nuiShape: act as a very high level Quartz like rendering object that mainly caches rendering operations so that the video card just have to execute a list of actions. Shapes can tesselate circles, ellispses, polygons, splines, rectangles into a list of triangles or a list of lines. GLU tesselation engine also optimizes the rendering because it tried to give triangle fans and triangle spans instead of stupid basic triangles when it can and this is what can make the rendering API of nui very fast. However, I know there are some optimisation posible in the actual rendering code to improve the triangle throughouput.

Partial redraw of the UI is implemented too, you can just call EnablePartialRedraw() on your nuiTopLevel object and voila (I believe it is enabled by default but if i'm not mistaken, but I disable it in the nuiTest example for obscure benchmarking reasons). If there are no animations on screen no redraw operation should occur. I try to verify that every few weeks to check that one widget is not spoiling the CPU for all the others.

Anyway, I'm always open to receiving feature and performance fixing patches :-).

Sebastien


Nikolay Avrionov wrote:

I was really impressed by NUI huge number of
components, but the poor performance makes it unusable
for any real application.

The single bottleneck is drawing and the way NUI uses
OpenGL to draw the user elements.

Almost every component has a part that is implemented
quite ineffectively.

Examples:
•       TreeView draws the triangles that represent
opened/closed nodes as filled contours using glu
tessellation engine to tessellate an every triangle.
The operation is slow and awkward. • Knob – draws a circle point by point using sin/cos.

Possible improvements:
•       Implement the basic primitives as fast opengl
operations (don’t rasterize circles using cos/sin  -
it is so 70s.) • Redraw the UI only when it is necessary.


-N.A


                


Reply via email to