You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Lukasz Matuszczak <l....@atrem.pl> on 2005/01/13 16:34:28 UTC

GVT to DOM references

I want to show a static svg document. I thought that it a GVT tree is 
sufficient to render image, so after initial rendering I can use 
JGVTComponent without DOM Tree (I want to use as little memory as possible). 
However it turned out that some GVT nodes (text nodes) hold references to 
some DOM elements, so the whole DOM tree can't be collected by garbage 
collector.

Is there any solution to that problem? Are there any plans to rewrite text 
handling in GVT tree in such way, that DOM tree won't be necessary in static 
document rendering?

Lukasz Matuszczak 



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: GVT to DOM references

Posted by Thomas DeWeese <Th...@Kodak.com>.
Lukasz Matuszczak wrote:

> I want to show a static svg document. I thought that it a GVT tree is 
> sufficient to render image, so after initial rendering I can use 
> JGVTComponent without DOM Tree (I want to use as little memory as 
> possible). However it turned out that some GVT nodes (text nodes) hold 
> references to some DOM elements, so the whole DOM tree can't be 
> collected by garbage collector.

    Correct.

> Is there any solution to that problem? 

    Yes.

> Are there any plans to rewrite text handling in GVT tree in such 
> way, that DOM tree won't be necessary in static document rendering?

    Not really.  The major issue for static documents is SVG Fonts.
Currently fonts are resolved in the rendering tree when the text is
laid out.  So to fix this you would need to move that to the bridge
or something (this is non-trivial, but not impossible).  In any event
the references are needed for dynamic documents but they could/should
be soft references in this case.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org