[Zope-dev] [Patch] Optimization for development mode

Brian Lloyd Brian@digicool.com
Thu, 30 Mar 2000 09:55:36 -0500


FYI guys - it looks like getmtime doesn't exist on windows 
(and possibly other platforms) - think we'll be able to 
get around that by sniffing the stat() structure though.

Thanks for the info!


Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com 




> -----Original Message-----
> From: Patrick Phalen [mailto:zope@teleo.net]
> Sent: Thursday, March 30, 2000 1:59 AM
> To: zope-dev@zope.org
> Subject: Re: [Zope-dev] [Patch] Optimization for development mode
> 
> 
> Good eye, Shane! It does feel more responsive now.
> 
> [Shane Hathaway, on Wed, 29 Mar 2000]
> :: 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!
> 
> _______________________________________________
> 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 )
>