----- Original Message -----
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, June 21, 2005 1:20 PM
Subject: Optimize SVG for dynamic update
Hello,
We're building an application that updates an large SVG (< 8MB) every 2
seconds. The SVG contains a lot of static parts that makes the update process
considerably heavier.
Are there ways to optimize the SVG (structure, layers, ...) so that the
updates take less CPU.
We use batik 1.5.1 on Windows 2000/XP. Updates are done via java
(RunnableQueue)
I have the similar problem (although my documents are 10 times smaller :)). I
received an answer from Thomas that what I really need is 'static' CSS hint from
SVG 1.2.
look here: http://koala.ilog.fr/batik/mlists/batik-users/archives/msg06866.html
It is not implemented in Batik so far.
I have tried also some workaround solution which puts several JSVGCanvas-es, one
above another. Static parts of document are presented in a one JSVGCanvas, which
is in the background and dynamic ones are put in JSVGCanvases with transparent
background. This solution gives you a big performance boost, because static
parts of document are rendered to an offscreen buffer only once. There are
however some complications, because it is important to set <svg> viewbox, x, y,
width, height attributes of top transparent layers properly, if we want them to
be a little smaller than bottom JSVGCanvas (each JSVGCanvas holds offscreen
buffer in memory, which can be big). Moreover if we want to cut some fragment
from the original document and put it in another JSVGCanvas, we have to care
about copy all CSS, fonts, symbols, gradients definitions.
Regards,
Lukasz Matuszczak
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]