|
|
We are trying to solve it by splitting the large SVG in 2 parts; one
static part and one dynamic part. We layer the dynamic part on top of
the static part so the updates will be done on small SVG.
Has anyone tried this before; suggestions are welcome:-)
Frederik
-----Original Message-----
From: Lukasz Matuszczak [mailto:l.matuszczak@xxxxxxxx]
Sent: Wednesday, June 22, 2005 7:29 AM
To: batik-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Optimize SVG for dynamic update
----- Original Message -----
From: "frederik.santens@xxxxxxxxxx" <frederik.santens@xxxxxxxxxx>
To: <batik-users@xxxxxxxxxxxxxxxxxxxxxx>
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: batik-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: batik-users-help@xxxxxxxxxxxxxxxxxxxxxx
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: batik-users-help@xxxxxxxxxxxxxxxxxxxxxx
|
|