We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › controlP5 examples very slow on Ubuntu
Page Index Toggle Pages: 1
controlP5 examples very slow on Ubuntu (Read 2973 times)
controlP5 examples very slow on Ubuntu
Jan 29th, 2010, 8:03am
 
Hi,

For a research project we choose processing because it's possible for non specialists to develop software... and it works.

But now we need to develop a graphical interface and it's not as easy as for drawing shape.

I try controlP5 but the examples are very slow and not usable. I try it on two different machines, one with Ubuntu 8.04 and one with Ubuntu 9.10.

Do you have any ideas about what could happens?

I also think about using a java application with processing embedded in it and then using classical Swing. But we loose the main advantage of processing: the ease of developement.

Any help would be appreciated.

Thank you in advance

P.S: I'm using Processing 1.0.9, controlP5 0.4.5

Re: controlP5 examples very slow on Ubuntu
Reply #1 - Jan 30th, 2010, 9:33pm
 
hi, i dont have an ubuntu machine handy but 0.4.5 works fine for me on mac. you could try an earlier version 0.3.14. curious what java version you are using and if you encounter performance issues with other sketches/examples as well. best, andreas
Re: controlP5 examples very slow on Ubuntu
Reply #2 - Feb 10th, 2010, 6:27am
 
Hi,

I was using:
java version "1.6.0_0"
OpenJDK  Runtime Environment (build 1.6.0_0-b11)
OpenJDK Client VM (build 1.6.0_0-b11, mixed mode, sharing)

and now with:
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)

it's much better
BUT
The example ControlP5textfield is still slow (almost 1 second latency betwee key hit and display) and there is no visible cursor.

if you have another idea, it would be great.
Re: controlP5 examples very slow on Ubuntu
Reply #3 - Feb 10th, 2010, 7:01am
 
If I use:
screen(x,y,P3D);
the examples are not slow anymore but the text is almost not readable and still no cursor.
Re: controlP5 examples very slow on Ubuntu
Reply #4 - Feb 14th, 2010, 5:19pm
 
Default renderer is really slow for me too.
Did you try P2D instead of P3D ? It works good with my examples.
Re: controlP5 examples very slow on Ubuntu
Reply #5 - Feb 14th, 2010, 5:33pm
 
Funny. For me it was the other way around: On the Ubuntu and Debian machines in our terminal room the P2D renderer is dead slow. I can speed things up by specifying JAVA2D instead. Unfortunately then lines and text look much worse, probably due to a different (or missing) antialiasing.

Andreas
Re: controlP5 examples very slow on Ubuntu
Reply #6 - Feb 14th, 2010, 7:53pm
 
hi, guessing from what has been described above i assume the text rendering is cause these problems. i am on mac, therefore cant copy the issues described above. regarding the blurred text in P3D i think i have found a solution but yet need to implement it. will work on an update. (do the lines still look bad when smoothing is disabled in JAVA2D?)
Re: controlP5 examples very slow on Ubuntu
Reply #7 - Feb 15th, 2010, 7:18am
 
I should clarify that my experience was not directly with the control5P library but more generally with several different sketches. Anyway, I went back to the terminal computers to check and found things have changed a lot (all machines have been upgraded, so I guess this means a new Java version too but unfortunately I don't know what they ran before, the Processing version is 1.0.8 as before though.). Now, as already mentioned in another post above, it's JAVA2D which is very slow and nice looking while P2D is much faster but does not look very nice. The JAVA2D look (on Linux):
...
and the same with P2D:
...

I think the speed differences are not due to text rendering though. I would consider the default Java installation on these Linux machines simply broken. One of my examples, a sketch drawing just a few triangles, circles and lines runs at ~600fps with P2D and slows down to 6fps with JAVA2D.

Andreas
Re: controlP5 examples very slow on Ubuntu
Reply #8 - Feb 17th, 2010, 6:33am
 
Hi,

Good news:
with Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)

AND

screen(x,y,P2D);

the examples are fast and good looking.

There is no apparent cursor but the character before the cursor is grey. I suppose this the normal behavior.
Re: controlP5 examples very slow on Ubuntu
Reply #9 - Mar 21st, 2010, 9:33am
 
I can confirm the issue and the fix under Kubuntu 9-10 x86_64. However it should be size(x,y,P2D) and not screen(x,y,P2D)  Smiley

Page Index Toggle Pages: 1