> The cpu load is 100%, as if the's a tight loop somewhere in batik > animation implementation. When the animation is over, cpu load is > correctly 0%.
Well, I wouldn't call it a tight loop. As you may notice, in
Squiggle's general preferences ("Edit" menu, "Preferences..." option,
"General" tab) there's an option to control "Animation rate limiting".
> What I am expecting is that the cpu load were very low, since the
> animation is VERY simple.
Yes, that's definitely weird. I'm not familiar with Batik's animation
engine so I'm not sure if some high level algorithm exists in order to
determine the minimum required key times to trigger document updates
(which, in the sample, should be just a few). Nevertheless, the CPU
percentage limit of preferences doesn't seem to be respected. I had a
setting of 75% but the usage did reach 100% of the available CPU
resources. Two quick experiments, using the frames per second limit
(set to "10") and the CPU limit (set to anything less than "50%") did
take the CPU usage to about 0%, the expected taking the animation's
complexity into consideration.
Some information on my particular test environment:
OS - Windows XP SP3
Java - 1.6.0_05
Batik - 1.7
Quickly consulted the bug database [2] and didn't found anything
apparently related.
> Any idea?
My guess is that either Squiggle or Java are not properly taking the
CPU limit preference setting. Tested with another animation sample
[1], to exclude the possibility of an issue specific to this
particular animation, which showed the same symptoms. Tested with a
Squiggle nightly build [3] (revision 668154 as of this writing), from
the unofficial nightly build repository [4], with the same result.
Additional experiments lead to diagnosing an interesting behavior
(which may help pin-pointing the issue): attached is a CPU usage trend
of running an animation sample [1] with CPU usage limit set to 10%. A
CPU peak is reached when the enter key is pressed after placing the
URL in the address bar: this is expected and corresponds to document
load process; afterwards, CPU usage does keep near the desired
maximum, but only during a fraction of second (sampling for the
graphic was about 0.5 seconds); finally, the 100% CPU usage peak is
reached and so it remains indefinitely.
Hope this helps,
Helder Magalhães
[1] http://srufaculty.sru.edu/david.dailey/svg/ovaling.svg
[2]
https://issues.apache.org/bugzilla/buglist.cgi?query_format=specific&bug_status=__open__&product=Batik
[3] http://arc.mcc.id.au/batik-nightly/webstart/squiggle.pl
[4] http://arc.mcc.id.au/batik-nightly/
<<attachment: Batik-AnimationCPUUsageLimitNotRespected.png>>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
