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 Tonny Kohar <to...@kiyut.com> on 2005/05/07 09:38:19 UTC

Re: How to keep memory foot print small for a svg document in JSVGCanvas

Hi,

On Fri, 2005-05-06 at 06:02 -0400, Thomas DeWeese wrote:
> chandrashekar srinivasan wrote:
> 
> > 1) I have a svg document which when rendered onto the JSVGCanvas takes 
> > up lot of memory.
> 
>     Do you know why it takes up lots of memory?
> 
> > I need to display the document only when a user 
> > invokes a menu item. Is there any way I could keep the document object 
> > bound to JSVGCanvas but only render when I show the canvas. again when 
> > the canvas is closed, free some memory. anything I could do with 
> > staticrenderer?
> 
>     One of the larger chunks of memory for the canvas is it's offscreen
> buffer (it may have two if you have double buffering set).  If you
> shrink the canvas size I think the offscreen buffers will shrink as
> well.  Ideally if you rendered statically you could drop the DOM
> completely and just keep the GVT tree.  This doesn't quite work in
> practice because Text keeps a reference to the DOM in order to resolve
> SVG Fonts (which is done at render time - for a variety of reasons).
> If you didn't care about this you could probably 'fix' this locally.

A little bit offtopic, I got questions regarding double buffering set.
- is the double buffer different with offscreen buffer ?
- Does turn off double buffering have any effect on the SVG / GVT
especially related to dynamic document ?
- Does double buffering have any effect on other stuff other than memory
eg: speed, etc ?
- Does double buffering have the same pixel size and content with
offscreen buffer ?

Thanks
Tonny Kohar
-- 
Sketsa 
SVG Graphics Editor
http://www.kiyut.com


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


Re: How to keep memory foot print small for a svg document in JSVGCanvas

Posted by Tonny Kohar <to...@kiyut.com>.
Hi,

Thanks for the info

Thanks
Tonny Kohar

On Sat, 2005-05-07 at 07:28 -0400, Thomas DeWeese wrote:
> Tonny Kohar wrote:
> 
> > A little bit offtopic, I got questions regarding double buffering set.
> > - is the double buffer different with offscreen buffer ?
> 
>     Double buffering means there are two offscreen buffers.  One is
> dedicated for repainting the screen.  The other is used for rendering,
> this avoids the possibility of the user seeing the document while it
> is being rendered (which might look really ugly).  When the rendering
> is completed the two buffers "swap" position.
> 
> > - Does turn off double buffering have any effect on the SVG / GVT
> > especially related to dynamic document ?
> 
>     It doesn't have any direct effect on the SVG/GVT tree's.  But the
> renderer obviously behaves a bit differently.
> 
> > - Does double buffering have any effect on other stuff other than memory
> > eg: speed, etc ?
> 
>     Double buffering is a bit slower as the newly rendered bits need to
> be propagated to the 'old' image.
> 
> > - Does double buffering have the same pixel size and content with
> > offscreen buffer ?
> 
>     More or less yes the off-off screen buffer isn't updated until it
> needs to be.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


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


Re: How to keep memory foot print small for a svg document in JSVGCanvas

Posted by Thomas DeWeese <Th...@Kodak.com>.
Tonny Kohar wrote:

> A little bit offtopic, I got questions regarding double buffering set.
> - is the double buffer different with offscreen buffer ?

    Double buffering means there are two offscreen buffers.  One is
dedicated for repainting the screen.  The other is used for rendering,
this avoids the possibility of the user seeing the document while it
is being rendered (which might look really ugly).  When the rendering
is completed the two buffers "swap" position.

> - Does turn off double buffering have any effect on the SVG / GVT
> especially related to dynamic document ?

    It doesn't have any direct effect on the SVG/GVT tree's.  But the
renderer obviously behaves a bit differently.

> - Does double buffering have any effect on other stuff other than memory
> eg: speed, etc ?

    Double buffering is a bit slower as the newly rendered bits need to
be propagated to the 'old' image.

> - Does double buffering have the same pixel size and content with
> offscreen buffer ?

    More or less yes the off-off screen buffer isn't updated until it
needs to be.

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