Re: thoughts on meta-data
will guaraldi <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 8 Apr 2005, Bill Mill wrote: > > However, I *still* think it's worth examining for the core. Especially > if we can save the file handles, already seeked to the right place, this > could be a time savings. .09 seconds is a small enough number to warrant > trying it out in the core to see how it works in the real world. I think this is definitely the way to go (minus the bit about keeping file handles because that's not a good idea--we'll run out) because it's the right thing to do. It allows plugins to operate on the metadata in the entries and that's definitely what we want to happen. It enables us to use mtimes set in the entry's metadata instead of the filesystem's os.stat. This combined with a couple of other changes will enable us to build a sort callback. It will cause a speed reduction, but the flip side is that the changes we're making will enable other kinds of caching which we can't do right now without some hacking. Between entry caching, index caching, and static rendering, I think we can handle people who have intense blogs for whom the speed issue is a real problem. (i.e. Ted) So I think the speed issue, unless it's a really severe one, isn't a show-stopper and Bill's idea is definitely worth proto-typing. Continuing on with refactoring, as near as I can tell no one has used the entry API to build other kinds of entries; everyone either instantiates base entries or FileEntry objects. So I'm thinking maybe in the next version of PyBlosxom we should simplify the entry stuff into a single Entry object and put the code in Pyblosxom/pyblosxom.py along with the Request object. If we take the file-centric code out of Entry and stick it in a function that populates the Entry object with the file contents, then I think we're fine and we'll find that's a better model. Anyhow, I'd like to work on this with Bill if he's ok with that. /will ------------------------------------------------------- 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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click