I'm trying to improve the loading/rendering time of the JSVGComponent
for handling multiple successive SVGDocuments.  The app allows the
user to step through a series of documents in response to a keypress.
For some documents (typically ones with lots of text) the
setSVGDocument() call can be very slow, on the order of 2-3 seconds.
That may not sound like much, but when you're in "browsing mode" it
can be painful for the user.  Note that I am already pre-constructing
the documents via SAXSVGDocumentFactory.createDocument().

I have not done any detailed profiling, but from cursory "println"
testing most of the time seems to be spent in the GVTTreeBuild phase.
Which leads me to my question- is there a recommended way to specify a
pre-built GVT Tree to the JSVGComponent when changing SVGDocuments?
I'm thinking of designing something along the lines of a

  setSVGDocument(SVGDocument doc, GraphicsNode gvtRoot)

Such an API would allow me to pre-build the next document and tree for
display, assuming I can correcly anticipate the user's next move.

Another alternative which I haven't tried yet is to simply replace the
whole JSVGComponent in the frame with one that already has the doc
loaded.  But that seems like overkill.  Any other ideas for a speedup?

Thanks.


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



Reply via email to