You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Richard Harris <rh...@rhel.cnchost.com> on 2004/02/13 17:46:07 UTC

RE: Making JavaScript run faster in Batik and Adobe

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.

Rick


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


Re: Making JavaScript run faster in Batik and Adobe

Posted by Thomas DeWeese <Th...@Kodak.com>.
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


Re: Making JavaScript run faster in Batik and Adobe

Posted by Gary Frederick <ga...@jsoft.com>.
I'm interested in knowing more.

I have mouse events in my tests. I don't think there are a lot, but 
things run slow.  I have found that Batik runs slower that the Adobe 
plugin. I thought both Batik and the Adobe plugin used rhino for 
JavaScript. I am learning how to use Java so I can compare using Java 
and using JavaScript speed.

so many interesting projects - 24 hours in the day...

Gary

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.
> 
> Rick
> 

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