Hi Julien,
<[EMAIL PROTECTED]> wrote on 09/17/2008 04:44:42 AM:
> Still in the business part of my application, I may need to perform
> an update on a list of text elements in my canvas.
[...]
> This represent from 50 to 100 elements that can need to be updated.
>
> Everything works fine but it tooks real long time to update the complete
list.
> I also added some "simple" timer[...] Here are the results
> Updating action labels
> -> Updating action label 1 (0 ms)
> -> Updating action label 2 (94 ms)
> -> Updating action label 3 (78 ms)
If the '78ms' is to update and render a list of
~100 text elements then it's probably what I expect from
Batik (unfortunately).
[...]
> -> Updating action label 9 (438 ms)
[...]
> -> Updating action label 30 (625 ms)
> ...
> As you can see, there are very long update like #30 with 625ms and
> the first one is at 0ms....
These almost certainly represent Java Garbage collection
events. I suspect that the first one (0ms) is a bug in the
timing code (or the change ends up being a no-op).
> I am new to Batik and i must have done something wrong ( I hope that
> is the problem... ). I also hope, someone will
> figure out what is happening there.
Without the full app it's hard to say for certain
but in general Batik's text layout is slow. The reasons
for this are complex but boil down to some slowness in
the underlying Java2D API's and the fact that Batik doesn't
have a 'really simple' text layout path.