JSui performance issues

f.e's icon

Hello,

I'm re-building a graphic interface for the 4th time and it seems every
approach is problematic.

To make it brief, you create/drag graphic objects made of one centered
circle and one circle for the adjustable radius. Nothing fancy.

- Java UI : tremondously cpu hungry. Event handling is a nightmare
- Java based external sending messages to an LCD : less hungry but still
unacceptable for realtime. Event handling still a nightmare
- C external sending messages to an LCD : very very good performances
BUT i am limited to the LCD features (no alpha channel). Event handling
still a nightmare
- JSui : Very handy event handling. Lots of drawing features.
Antialiasing. Alpha channel. Unfortunately, tremondously cpu hungry.

I know my code is dirty at this point, but i've watched the same cpu
spikes using technoui so i suspect it's JSui's law.

Is there anyway to have a sprite behavior in JSui (like in LCD) ? Or do
i have to redraw all my things when i just want to move one without
leaving traces behind (erase / redraw everything when you just change
one thing) ?

This second solution seems to lead to HUUUUGE CPU usage (sometimes 100%
of one core) when you got several things to draw.

At the time i'm writing, i have only 4 circles objects on my scene, and
trying to change ones color continuously with a color swatch and a very
simple frgb function (like you have in any jsui examples) makes my mouse
stutter and my cpu goes to the clouds...

Max 4.6.3 / XP SP2 / DualCore 2.16Ghz / NVIDIA GeForce Go 7800 GTX

Thanks in advance

f.e

--
f.e chanfrault | aka | personal computer music
>>>>>>> http://www.personal-computer-music.com
>>>>>>> | film soundtracks, sound art, music |

Jeremy's icon

You might consider building your UI in OpenGL with jit.gl.sketch and/or jit.gl.gridshape. Then you get the GL benefits you're seeing in JS, but with hardware, rather than software rendering.

jb

f.e's icon
skrasms's icon

Increase the shapeslice attribute in the jit.gl.sketch to get better looking circles.

I redid a couple of my old JSUI interfaces in Jitter a couple months ago, and both saw a large decrease in CPU use even without hardware rendering. It really seems like the best way to go.

f.e's icon