Re: new plugin: alphabetical index
Ryan Barrett <pyblosxom-6sb6M7qyT/[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 9 Oct 2006, Todd Warner wrote: > I see your point, of course. PyBloxsom needs a default caching flag > mechanism. E.g., "this entry has changed!" flag. Should be "simple" to add > (not that I am volunteering at the point) mtime and filesize is good enough they're definitely good enough. pyblosxom actually already caches that kind of stat data. the problem is, unless it's running in something like wsgi, which is rare, the python interpreter starts fresh for each request. so, pyblosxom's stat cache only lasts for the duration of a request, which makes it mostly useless. :/ it needs a cache that persists across requests, likely on disk. combined with the hardcodedates plugin, my cb_filestat() callback patch provides just such a disk cache. a cb_walk() callback could do the same thing for directory structures. > An aside: file stats are pretty dirt cheap, even for a lot of files. maybe so, but they're still a couple orders of magnitude more expensive than fetching from memory. for an average-sized pyblosxom blog, a request for the front page will easily need to stat tens or hundreds of files and directories. that will usually swamp everything else. granted, premature optimization, etc. :P i'd plan to investigate and profile pyblosxom before i did any serious work on this stuff. -Ryan -- http://snarfed.org/ ------------------------------------------------------------------------- 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