Hi,

(Sidnei da Silva cc'd directly as I don't know if he's on this list and
is apparently the guru of all things WebDAV.)


I have a problem with large RAM usage when accessing a BTreeFolder-ish
object via WebDAV.  This is particularly bad for me as I'm in a hosting
environment with limited RAM available.

Does anyone see a problem with turning my custom type's listDAVObjects
method into something like this?

    def listDAVObjects(self):
        """This may have unpleasant side-effects!  Turn this into a
        generator that deactivates objects after they have been yield-ed.
        """
        for obj in self._tree.itervalues():
            yield obj.__of__(self)
            obj._p_deactivate()

I've done limited testing, and things do seem to work - both in the
sense of DAV access not breaking, and memory usage staying stable and
low.  Is this a reasonable approach, or am I destined for trouble?

If it is reasonable, does it make sense to apply something like this
patch for BTree-ish folders in general?


Tim

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to