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 & HelpPrograms › Lagging applet
Page Index Toggle Pages: 1
Lagging applet (Read 747 times)
Lagging applet
May 10th, 2010, 2:52pm
 
I'm not quite sure if this is the place to post this, but I have a simple graph-drawing applet that functions fine, & runs online ok..However, the graph bars grow using a tweening library, they go smoothly the first time through, but when changing views it seems to lag and the bars move up in rough chunks. Could anyone have a quick look at the source for me & tell me if it's just caused by the applet having to load the new set of values from elsewhere on the web? - I'll fix it myself it it is but I'm just unsure what is causing the lag.

Hope that makes sense!

The applet is here, move over the squares to change the ordr of the bars. (Please don't abuse me too much for the less-than imaginative presentation on this one!) Wink


http://samhumphrey.co.uk/testArea/MedalsApplet/index.html
Re: Lagging applet
Reply #1 - May 11th, 2010, 2:48am
 
The "move over squares" to start an action is disturbing... You should handle clicks there instead.
In updateEverything(), you re-load the flag images. Looks unnecessary and that's a probable a cause of the lagging.
Page Index Toggle Pages: 1