xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: Making JavaScript run faster in Batik and Adobe
Date Sun, 15 Feb 2004 20:34:53 GMT
Richard Harris wrote:
> Hi,
>   I have made some progress on solving performance issues.  A control-break at a
> time of high cpu usage indicated that it was painting (actually doing clipping
> processing).  My experience so far is that the javascript is fast, but that
> painting (when nested clipPaths are used too heavily) and mouse tracking (when
> there are lots of mouse sensitive objects, or when the mouse sensitive objects
> make heavy use of clipping) is slow.  I have found that changes that improve
> Batik's processing speed seem to also improve Adobe's speed.

Hi Richard, Gary,

    So I took a look at your example.  It looks like there are some
things you could try to speed up performance.  The first thing
I would try to improve 'interactivity' is move most of the 'graphics'
into a separate group and mark the whole group with
'pointer-events="none"'.  This will avoid doing hit testing on all
that geometry (we cull on BBox but because your shapes are diagonal
this doesn't help much).  A small win is to use 'visibility="hidden"'
instead of 'opacity="0"' - since you are already setting
pointer-events to fill you don't need to do anything else.
This should work well for you because you have a separate set of
'selector' geometry.

    Also it would probably render faster if instead of having
many many small rects each with a different clip path if you 
constructed one clip path for each of the weave directions.  If
you applied the clip to a group for the entire weave direction
I suspect rendering would show a marked performance improvement.
I also suspect that building performance would increase quite a
bit.

    You should also be careful to only append shapes _after_ you
have set most of their attributes.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message