Re: Patch for simple walk caching
Ted Leung <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
Bill, What will said is right, but I'd be interesting in testing your cache changes if you are caching data between requests. Ted On Dec 6, 2004, at 8:23 AM, will guaraldi wrote: > > Well, he's not trying to solve the request-to-request caching issue > but rather the issue where in a single pyblosxom request, there are > several calls to tools.Walk that walk the directory tree and bring > back results. So if you've got your blog running with pyarchives, > pycalendar, and pycategories, you do a tools.Walk on the directory > three 3 or 4 times. > > Caching that reduces the number of times down to 1. > > /will > > > On Mon, 6 Dec 2004, Bill Mill wrote: >> >> I've been working on a cache too. Are you using mod_python? If not, >> doesn't a new python process with a new memory segment get created on >> every request, meaning that an in-memory cache would never be read? >> >> Peace >> Bill Mill >> bill.mill at gmail.com >> >> On Mon, 6 Dec 2004 00:41:25 -0800, Ted Leung <[email protected]> wrote: >>> 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 >>> >>> >>> >>> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real >> users. >> Discover which products truly live up to the hype. Start reading now. >> http://productguide.itmanagersjournal.com/ >> _______________________________________________ >> Pyblosxom-devel mailing list >> Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org >> https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel >> > > -- > whatever it is, you can find it at http://www.bluesock.org/~willg/ > except Will--you can only see him in real life. > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Pyblosxom-devel mailing list > Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel > ---- Ted Leung Blog: <http://www.sauria.com/blog> PGP Fingerprint: 1003 7870 251F FA71 A59A CEE3 BEBA 2B87 F5FC 4B42 This message is: [ ] bloggable [x] ask first [ ] private ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/