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 Andreas Neumann <ne...@karto.baug.ethz.ch> on 2005/10/06 15:46:54 UTC

static patch - partial success

Hi Thomas,

I am happy to report that I have now partial success and can see the 
effects of the static patch. It works both on Windows and Macintosh 
(even Macintosh ;-)!).

Here are two examples where I applied the static attribute:
http://www.carto.net/neumann/temp/mapWaadt.svg
http://www.carto.net/neumann/temp/mapSpain.svg

So, it also seems to work well with rasters.

-------------

Next I tried to apply the static attribute to my more dynamic mapping 
examples.

Here is the URL: 
http://www.carto.net/papers/svg/postgis_geturl_xmlhttprequest/example.svg

I statically applied the static attribute in the small reference map 
(background of the reference map) where it seems to run nice and fast.

The other static attribute is now added by script for the manual 
panning, on mousedown, at the start of the dragging process (see 
navigation.js (method .panManualFinally()).

In that case I am not that sure if the static attribute fully works. It 
seems to run somehow faster, but not as fast as in the first two examples.

As you suggested, I also stopped updating the display of the mouse 
coordinates during panning.

Is there a problem if I first change stuff within the group where I 
later (during the same script run) set the static attribute of that 
group to "true"?

Thanks for your thoughts,

Andreas




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


Re: static patch - partial success

Posted by Andreas Neumann <ne...@karto.baug.ethz.ch>.
Hi Thomas,

>  
>
>>Next I tried to apply the static attribute to my more dynamic mapping
>>examples.
>>
>>Here is the URL:
>>http://www.carto.net/papers/svg/postgis_geturl_xmlhttprequest/example.svg
>>    
>>
>[...]
>  
>
>>In that case I am not that sure if the static attribute fully works. It
>>seems to run somehow faster, but not as fast as in the first two examples.
>>    
>>
>
>   Yes, I have noticed this, and I am not sure why it is not as big
>a difference.  I suspect that the Java2D renderer is dropping into
>a lower performance drawing case, when I get the change I may play
>with it more.  I would check things like clip-paths and the like.
>  
>

that would be very nice, if you could do some further investigations 
here. I don't use clip-paths here. I only move the content in a nested SVG.

The structure looks like the following:

<svg>
<!-- the gui, screen oriented coordinate system -->
<svg><!-- the map coordinate system, usually in meters or degrees -->
    <g batik-static="true" transform="translate(x,y)"> <!-- the static 
attribute set by script, translate attribute set while dragging -->
       <!-- map content, mostly path, but also text and sometimes 
use-elements -->
    </g> 
</svg>
</svg>

I don't know if the problem is because of the nested SVG? But in the 
mapWaadt.svg and mapSpain.svg example we also move the content within a 
viewBox (not nested, but clipped to the viewBox area).

Please let me know if there is anything more to test or to change in my 
code.

Thanks a lot,

Andreas

-- 
----------------------------------------------
Andreas Neumann - Institute of Cartography
Swiss Federal Institute of Technology (ETH)
ETH Hoenggerberg
CH-8093  Zurich, Switzerland
Phone: ++41-1-633 3031, Fax: ++41-1-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/


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


Re: static patch - partial success

Posted by Thomas DeWeese <Th...@Kodak.com>.
Hi Andreas,

Andreas Neumann wrote:
> I am happy to report that I have now partial success and can see the
> effects of the static patch. It works both on Windows and Macintosh
> (even Macintosh ;-)!).

   Yes, I would suspect the inital drawing would be quite
slow, but the 'repaints' should be fairly quick (although
potentially not as fast as possible).

> Here are two examples where I applied the static attribute:
> http://www.carto.net/neumann/temp/mapWaadt.svg
> http://www.carto.net/neumann/temp/mapSpain.svg
> 
> So, it also seems to work well with rasters.

   Yes, the point I was making about rasters earlier is not
that something about Rasters make them slow, just that drawing
a raster is sooo fast already that caching a screen version of
the data isn't a big win.

> Next I tried to apply the static attribute to my more dynamic mapping
> examples.
> 
> Here is the URL:
> http://www.carto.net/papers/svg/postgis_geturl_xmlhttprequest/example.svg
[...]
> In that case I am not that sure if the static attribute fully works. It
> seems to run somehow faster, but not as fast as in the first two examples.

   Yes, I have noticed this, and I am not sure why it is not as big
a difference.  I suspect that the Java2D renderer is dropping into
a lower performance drawing case, when I get the change I may play
with it more.  I would check things like clip-paths and the like.

> As you suggested, I also stopped updating the display of the mouse
> coordinates during panning.
> 
> Is there a problem if I first change stuff within the group where I
> later (during the same script run) set the static attribute of that
> group to "true"?

   No, there should be no problem with this.


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