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: Batik for CAD
Date Sat, 10 Sep 2005 10:51:15 GMT
Hi Greg,

Greg wrote:
> I'm evaluating Batik for use in a basic floorplan/CAD application, but 
> I've stumbled into some performance issues (system & svg details 
> below).  Initial rendering performance is good; I've clocked the GVT 
> build cycle around 6 sec.  The problem arises when I try to move layers 
> around on the canvas.  Moving one layer at a time is fine, and it takes 
> a few seconds. But one of the application's requirements is to move many 
> layer at a time to provide a different view of the drawing.  This was 
> taking anywhere from 15 to 30 sec depending on how many layers there 
> were to move and how close they were to their new position.

    How are you moving the layers?  Are you simply adding/updating
a transform attribute on the layer's group or are you trying to
modify every path element?

    There is also the option to put each layer in a 'transparent'
canvas.  If you did this Batik would cache each layer as a raster
so moving a layer would be really fast.  I've also done some work
in implementing the 'static' property from SVG 1.2 which would allow
you to indicate that the rendering engine should cache each layer
in the document as a raster.

> Generally, I'm concerned because my development machine is a decent 
> machine, and many of my users are certainly going to have lesser 
> machines.  Is Batik a good solution for large sized CAD files or would 
> performance be better using other tools?  Thanks for helping with my 
> problem!

   During a rendering cycle the majority of the time is spend in
the rendering calls, so with Java you are unlikely to do much better
than Batik, and many will do worse as Batik's update engine is fairly
well optimized, on the flip side Batik needs to support 'general'
drawing so a totally focused application could potentially do better.

> 
> My Setup:
> *Athlon 64 3000+ with 1GB of ram
> *Java JDK1.5
> *Batik 1.6
> 
> SVG File Description:
> *Approx.  4Mb not compressed
> *Structure
>    -drawing elements are grouped by layer
>    -a complex layer can contain about 15,000 lines (7,500 shape 
> elements; 7,500 group elements)
>    -each shape has its own group nested under a layer because a shape 
> can have other elements associated with it
>    -Example layout...     <g opacity="1.0" id="Layer1">        <g 
> id="G1_L1">
>            <line  .../>
>            <circle ... />
>        </g>
>        <g id="G2_L1">
>             <line  .../>
>            <circle ... />
>        </g>
>         ........many more elements......
>    <g>
>    <g opacity="1.0" id="Layer_2">        <g id="G1_L2">
>            <line  .../>
>            <circle  ... />
>        </g>
>        <g id="G2_L2">
>             <line  .../>
>            <circle ... />
>        </g>
>         ........many more elements......
>    <g>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


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


Mime
View raw message