Tag caching, at last

Simon Heimberg simohe at besonet.ch
Sat Jul 11 11:15:31 CDT 2009


Sounds good. I don't understand all, but I saw one detail: Why don't you
use atomictempfile for writing the cache file? (By the way, what is mode
"rt"?) This would look like this:

cachefile = repo.opener("tags.cache", "w", atomictemp=True)
...
# write cachefile
...
cachefile.rename()


Am Freitag, den 10.07.2009, 11:34 -0400 schrieb Greg Ward:
> I finally have a working tag cache implementation.  The "ah-ha" moment
> came when I realized we don't *have* to cache .hgtags contents, since
> that's not the most expensive part of reading tags.  The only thing
> that's critical to cache is (as Matt keeps saying) the head->filenode
> mapping.  So I threw together a tag cache that *only* caches that
> stuff and doesn't even try to cache .hgtags contents.
> 
(snip)


More information about the Mercurial-devel mailing list