>>>>> "GA" == Georg Apitz <[EMAIL PROTECTED]> writes:

GA> Does anyone know a trick to decrease the loading time of the svg
GA> documents?  loading a file with a size of about 1MB takes 15 to 20
GA> secs with my application Mac OS X, Powerbook G4, 667, 768 MB RAM,
GA> JDK 1.3.1

    First a couple of questions:

    Are you talking 'first time' rendering or subsequent rendering?
    Second what version of Batik?  1.5b5?
    Do you know where the time is spent?


    With Java classes are loaded on demand so the first rendering is
when the JDK loads a large chunk of Batik.  Often the first rendering
is 2-3x slower then subsequent reloads.

    There were a few small performance tweaks that went into 1.5b5,
although nothing really major.

    There are three distinct phases to a Batik rendering, the
'loading', 'building' and 'rendering'.  If you go to preferences you
can have batik print out times for each of these phases as they occur.
The 'loading' time is more or less out of our control - as it is the
time Xerces takes to read the file and build our DOM.

    Building is usually not the bottle neck, and then rendering is
where we have the most control (and greatest possibility of performance
increase).

    Couple of known weaknesses, Xerces is slow for attributes that are
_very_ large (I've only really seen this for uses of 'data:' images
where the xlink:href attribute can be 100's of K, perhaps even a MB -
however if you have something like three paths in your 1MB file you
might trip over this).

    Text is slower than we would like.  A fair amount of work has gone
into this, but right now the use of JDK classes is the major
bottleneck (in particular AttributedString - our strings are very
heavily attributed and this seems to be problematic for the JDK
implementation).



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

Reply via email to