[Zope-dev] memory leak

Chris McDonough chrism@digicool.com
Wed, 11 Apr 2001 03:03:47 -0400


Hi Marco,

This looks like a potential bug in either ParsedXML or the code you're using
to manipulate the components within ParsedXML.

We'd like to find out!  ;-)  Do you think you can file a collector report
with enough information in it to reproduce this behavior?

Many thanks,

- C

----- Original Message -----
From: "Marco Nova" <nova@tera-it.com>
To: "Zope-Dev (E-mail)" <zope-dev@zope.org>
Sent: Wednesday, April 11, 2001 2:29 AM
Subject: RE: [Zope-dev] memory leak


> > have you checked the debug page in the control panel and
> > noted any refcounts
> > increasing?
>
> Class  April 10, 2001 9:17 am  April 11, 2001 8:34 am
>
> Products.ParsedXML.DOM.Core.Text                  3241  27318  +24077
> Products.ParsedXML.DOM.Core.Element               1777  14493  +12716
> Products.ParsedXML.DOM.ExpatBuilder.ExpatBuilder  81  1506  +1425
> Products.ParsedXML.Printer.PrintVisitor           3  107  +104
> Products.ParsedXML.DOM.Core.Document              10  112  +102
>
> Yes, I've a lot of refcounts leaks.
>
> > any chance that this is the same problem that andy is running
> > into (read his
> > posts above)?
>
> I dunno because of my very lack of knowledge of Zope.
> All of these refcounts leaks means that the Product is doing something
wrong
> or that I'm using in the wrong manner ?
>
> - mn
>
> >
> > -d
> >
> > On Tue, Apr 10, 2001 at 05:27:28PM +0200, Marco Nova wrote:
> > > Hello guys,
> > >
> > > It seems that I've some memory leak problems and I want to
> > understand where
> > > I've to look for.
> > >
> > > Scenario:
> > >
> > > I've an IIS web server that generates an XML page (taking data from
> > > SqlServer);
> > > The Zope web server must retrieve the XML page, manage the
> > data and render
> > > them in HTML (I cant only apply a XSL stylesheet to XML).
> > >
> > > The Facts:
> > >
> > > I've written a external method that - using httplib - reads
> > the XML page and
> > > return a string that is the raw XML sources, than I've
> > written another
> > > external method that use ExpatBuilder of
> > Products.ParsedXML.DOM to parse the
> > > XML an generate a list of [(id - {mapping})] which will be
> > accessed with a
> > > dtml-in tag, so in the sequence-key I've access to the ID and with
> > > sequence-item I can access to the mapping object.
> > > I'm using latest version of ZOPE (2.3.1, the binary one
> > with Python 1.5.2)
> > > and ParsedXML.
> > >
> > > The Problem:
> > >
> > > It seems that every time the method retrieve the page or
> > parse the XML I
> > > loose a bunch of kilobytes. Because the methods are very
> > simple (100 lines
> > > of code in total) and because I didn't create any class for
> > handling this
> > > workflow I can't understand where I can loose bytes.
> > >
> > > The Questions:
> > >
> > > Is the list generated for the dtml-in tag freed
> > automatically by ZOPE ?
> > > Is there a Garbage Collector somewhere that must be activated ?
> > > Should I avoid the use of the ExpatBuilder for XML processing ?
> > >
> > > Thanks for listening my newbies questions.
> > >
> > >
> > > Best Regards,
> > >
> > > - mn
> > >
> > > _______________________________________________
> > > Zope-Dev maillist  -  Zope-Dev@zope.org
> > > http://lists.zope.org/mailman/listinfo/zope-dev
> > > **  No cross posts or HTML encoding!  **
> > > (Related lists -
> > >  http://lists.zope.org/mailman/listinfo/zope-announce
> > >  http://lists.zope.org/mailman/listinfo/zope )
> >
> > --
> > Dyon Balding <dyon@devcoder.com.au>
> >
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>