Re: cb_filestat patch
Will Guaraldi <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
I (finally) applied this to the code-base. It looks ok, but I haven't tested it rigorously. /will On Tue, 5 Sep 2006, Ryan Barrett wrote: > > hi again. i'm attaching a proposed patch to tools.filestat that changes the > way the cb_filestat callback is handled. > > currently, cb_filestat is intended to let plugins override the mtime returned > from os.stat(). however, those plugins are often also in the position to > provide a cheaper alternative to os.stat() altogether. > > hardcodedates is a good example; it stores all mtimes in a single file. in > the > case of large pyblosxom sites, reading that file once is *much* faster and > cheaper than statting hundreds, possibly thousands of separate entry files. > > this patch changes tools.filestat to let plugins provide a stat value first. > it only falls back to os.stat() if no plugin provides a value. > > -Ryan ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV