Ralf Siegel wrote:

  One possible solution would be to merge all the graphics into
one larger graphic (one document with say 200 image elements or
better just put them all in one document).  Then you can pull the
results out of the generated image.  You might also consider
stratagies where you only do this once and cache the generated
graphics on the client.


Cool - it seems like I'm on the right track :o) I already have a SVG Loader implemented which caches parsed documents and e.g. renders multiple buttons by switching layers + the generated graphics are saved to disc for a fast startup.

Depending on how large the layer changes are you might do well to use the 'Dynamic Renderer' that will only rerender the changed areas.

What about that case: Assuming there is an SVG document 'elements.svg' which holds three elements 'green', 'blue', 'red'. Then there are anpther two separate SVG files which are referencing certain elements in that document, i.e.

---> "A.svg" uses element 'green' and 'red'

---> "B.svg" uses elememt 'blue' and 'red'

Question: Both "A.svg" and "B.svg" require AFAIK to load and parse "elements.svg" twice, right? Could you simply tell Batik to keep "elements.svg" for later reuse?

I am almost certain that by default A & B will each load and parse 'elements.svg' once - not twice.

  I believe all this caching behaviour is controlled by the 'DocumentLoader'
class in the batik.bridge package.  This is normally constructed fresh for
each document by the BridgeContext - however you can construct one 'up front'
and pass it to the  BridgeContext's contstructor - so it can reuse documents.


ralf ...



------------------------------------------------------------ Ralf Siegel - Freelance Developer Recommended Listening: Broadcast - Haha Sound (Warp) contact_site: mailto:[EMAIL PROTECTED] -------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to