[Zope-dev] [Patch] Optimization for development mode
Martijn Pieters
mj@digicool.com
Thu, 30 Mar 2000 08:25:37 +0200
On Wed, Mar 29, 2000 at 07:55:51PM -0700, Shane Hathaway wrote:
> Ever since I started using Zope I thought its management
> interface was a little sluggish. Today I found out why, and
> the correction is very easy. If you are running Zope in
> development mode, especially in Unix, you will notice a
> healthy improvement in responsiveness.
>
> It turns out that because of a small bug, every time a DTML
> file is read from the file system (including management
> pages) it is re-parsed whether the file was modified or not.
> The reason is because the current logic checks not only the
> file modification date but also the file access date, which
> changes every time the file is read.
>
> Open lib/python/App/special_dtml.py in a text editor.
> Change one line (probably line 115) from:
>
> t=os.stat(self.raw)
>
> to:
>
> t=os.path.getmtime(self.raw)
>
> Restart Zope and enjoy a slightly faster development cycle!
> ;-)
Could you please put this in the Collector? We don't want this to get lost in
the Zope-Dev archives..
http://www.zope.org:8080/Collector
--
Martijn Pieters
| Software Engineer mailto:mj@digicool.com
| Digital Creations http://www.digicool.com/
| Creators of Zope http://www.zope.org/
| The Open Source Web Application Server
---------------------------------------------