Tihauan / jsgauge

Automatically exported from code.google.com/p/jsgauge
0 stars 0 forks source link

Performance is slow when multiple gauges setValue() quickly #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a bunch of gauges
2. on a 200-500ms interval, setValue()to some random value 
3. watch for a while as updates get slower and slower

What is the expected output? What do you see instead?
Expected that the gauges would update on the interval.  Saw it gradually grind 
down to updates only every 2-3 seconds.

What version of the product are you using? On what operating system?
latest version.  Chromium 14 and firefox 7 were tested.

Please provide any additional information below.
attached is the modified "live" example that demonstrates this behavior.

Original issue reported on code.google.com by tripzero...@gmail.com on 12 Oct 2011 at 9:27

Attachments:

GoogleCodeExporter commented 9 years ago
Looks like the closures in setValue() and draw() were to blame.  Attached is my 
modified version that fixes the closures.

Original comment by tripzero...@gmail.com on 13 Oct 2011 at 7:54

Attachments:

GoogleCodeExporter commented 9 years ago
Your version disables animation and this, not removing the closure may the 
actual fix. I think we can have a flag for disabling animation to prevent 
performance issues.

Original comment by dragos.tihauan on 14 Oct 2011 at 8:47

GoogleCodeExporter commented 9 years ago
fixed this issue by adding a "moveflag" flag and move the pointer to the latest 
set value.

Original comment by Chen.Ter...@gmail.com on 15 Nov 2011 at 9:51

Attachments:

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/jsgauge/source/detail?r=62

Original comment by dragos.tihauan on 1 Jan 2012 at 8:13

GoogleCodeExporter commented 9 years ago
how do you use the new "moveflag" ?

Original comment by tripzero...@gmail.com on 1 Jan 2012 at 9:31