with a win2000 platform, a jdk 1.3 and batik 1.1.1 I've got no out of memory and after several reload the amount of memory stay the same
Regards stephan >From: "Jenny Liu" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: <[EMAIL PROTECTED]> >Subject: out of memory problem >Date: Wed, 19 Dec 2001 17:42:32 -0600 >MIME-Version: 1.0 >Received: from [64.125.133.20] by hotmail.com (3.2) with ESMTP id >MHotMailBDEA711800464004315C407D85140E1E0; Wed, 19 Dec 2001 15:43:21 -0800 >Received: (qmail 6292 invoked by uid 500); 19 Dec 2001 23:43:12 -0000 >Received: (qmail 6281 invoked from network); 19 Dec 2001 23:43:12 -0000 >From batik-dev-return-3096-snpapin Wed, 19 Dec 2001 15:45:19 -0800 >Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm >Precedence: bulk >List-Post: <mailto:[EMAIL PROTECTED]> >List-Help: <mailto:[EMAIL PROTECTED]> >List-Unsubscribe: <mailto:[EMAIL PROTECTED]> >List-Subscribe: <mailto:[EMAIL PROTECTED]> >Delivered-To: mailing list [EMAIL PROTECTED] >Message-Id: <sc20d195.019@cab07> >X-Mailer: Novell GroupWise Internet Agent 5.5.4.1 >X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > >Hi, > >We plug batik into our system as a java bean to view our svg documents. And >we still have out of memory problem. > >It can be reproduced by using batik svgbrowser as follows. > >1) Open batik browser window. >2) go to http://cec.wustl.edu/~jl2/sample.svg >3) reload >4) reload >5) out of memory > >I have some memory usage statistics here (read from memory monitor in >tools) > > Memory Usage >open batik browser 5,500 k >http://cec.wustl.edu/~jl2/sample.svg 22,000 k >reload 51,000 k >reload out of memory > >If I manually do garbage collection in between each step, I got > > Memory Usage >open batik browser 5,000 k >http://cec.wustl.edu/~jl2/sample.svg 22,700 k >garbage collect 22,000 k >reload 58,000 k >garbage collect 39,900 k >reload out of memory > >In our system, we use JScrollPane to hold the svgCanvas, so that when we >zoom, we still see the whole picture. I added a JScrollPane in batik >browser by making a tiny change to JSVGViewerFrame.java > > JScrollPane myScrollPane = new JScrollPane(svgCanvas); > myScrollPane.setPreferredSize(new Dimension(800, 800)); > p2.add(myScrollPane, BorderLayout.CENTER); > //p2.add(svgCanvas, BorderLayout.CENTER); > p = new JPanel(new BorderLayout()); > p.add(p2, BorderLayout.CENTER); > p.add(statusBar = new StatusBar(), BorderLayout.SOUTH); > >Then I found I could run out of the memory even quicker > > Memory Usage >open batik browser 13,000 k >http://cec.wustl.edu/~jl2/sample.svg 46,000 k >reload out of memory > >and with garbage collection in between, > > Memory Usage >open batik browser 13,000 k >http://cec.wustl.edu/~jl2/sample.svg 47,000 k >garbage collect 37,000 k >reload out of memory > >I think the problem comes from the viewbox attribute in svg file. When the >width and height is very big, it taks a lot of memory to display. Since our >system requires the user should be able to see the whole picture of the >enlarged svg file, we'll have to set the big width and height accordingly. > >Doing manually garbage collection does help a bit. In >/org/apache/batik/apps/svgbrowser/Main.java, I also see garbage collection >at the end of the rendering. > > c.addGVTTreeRendererListener(new GVTTreeRendererAdapter() { > public void gvtRenderingCompleted(GVTTreeRendererEvent e) { > initDialog.dispose(); > v.dispose(); > System.gc(); > run(); > } > }); > >Doesn't it seem like the memory leak problem is still out there? > >Thanks! > >Jenny > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________ Rejoignez le plus grand service de messagerie au monde avec MSN Hotmail. http://www.hotmail.com/fr --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]