Patch for simple walk caching

Ted Leung <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
Hi all,

I've attached a small patch to tools.py which caches the results of 
calls to tools.Walk.  On my blog, I am using pycategories, pyarchives, 
and pycalendar, each of which do a tools.Walk of the entire datadir.   
This was taking up a bunch of time, so I started looking for ways to 
reduce this.
At the moment the patch caches according to the value of the root 
passed to Walk, and assumes fixed values for the optional parameters.  
This is good enough to reduce the number of calls related to tools.Walk 
dramatically.

I could just commit the patch, but I wanted to get some feedback on 
whether folks thought this was a good thing.



I also have some hotshot traces of running my blog with various 
caching, etc turn on/off.
----
Ted Leung                          Blog: <http://www.sauria.com/blog>
PGP Fingerprint: 1003 7870 251F FA71 A59A  CEE3 BEBA 2B87 F5FC 4B42
walk-cache-patch (application/octet-stream, 1.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.