Re: [ZODB-Dev] [Performance] excessive time in "Connection.afterCompletion"
Jim Fulton wrote: ... You can do that now. Just start a thread with the main loop. Note that Zope 3 does this now when the Twisted server is used. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] [Performance] excessive time in "Connection.afterCompletion"
___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] [Performance] excessive time in "Connection.afterCompletion"
Hi Tim, Tim Peters wrote at 2006-3-31 18:48 -0500: > ... >> What is the motivation to request synchronized transaction completion >> by default? > >Primarily so we could stop seeing endless threads on zodb-dev asking >why ZEO clients that didn't happen to modify any objects never saw >current data. From the NEWS file: > >- (3.4a6) Relatedly, ``Connection`` implements ``ISynchronizer``, and > ``Connection``'s ``afterCompletion()`` and ``newTransaction()`` methods now > call ``sync()`` on the underlying storage (if the underlying storage has > such a method), in addition to processing invalidations. The practical > implication is that storage synchronization will be done automatically now, > whenever a transaction is explicitly started, and after top-level > transaction commit or abort. As a result, ``Connection.sync()`` should > virtually never be needed anymore, and will eventually be deprecated. Based on my observation, I fear it is a too expensive measure. If an asyncore mainloop (or something equivalent) is running, then we would get the same effect without the sync. Maybe we should go this route (and ensure instead that a mainloop is always running). -- Dieter ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] [Performance] excessive time in "Connection.afterCompletion"
[Dieter Maurer] > We are currently tuning an application for performance and therefore > perform intensive profiling. To our surprise, it turned out > that about 15% of total request time was spent in > "Connection.afterCompletion". "Connection.afterCompletion" is mapped > to "Connection._storage_sync" which in our case called the > "ZEO.ClientStorage"'s "sync" method (and this caused the excessive > time). > > > What is the motivation to request synchronized transaction completion > by default? Primarily so we could stop seeing endless threads on zodb-dev asking why ZEO clients that didn't happen to modify any objects never saw current data. From the NEWS file: - (3.4a6) Relatedly, ``Connection`` implements ``ISynchronizer``, and ``Connection``'s ``afterCompletion()`` and ``newTransaction()`` methods now call ``sync()`` on the underlying storage (if the underlying storage has such a method), in addition to processing invalidations. The practical implication is that storage synchronization will be done automatically now, whenever a transaction is explicitly started, and after top-level transaction commit or abort. As a result, ``Connection.sync()`` should virtually never be needed anymore, and will eventually be deprecated. ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev