Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/hg.py @ 358:9f4077d7ef6f
[PATCH] manifest.readflags performance buglet
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[PATCH] manifest.readflags performance buglet
From: Chris Mason <mason@suse.com>
Performance buglet in manifest.readflags: only re-read the manifest
when the mapcache is not present or does not correspond to this node
manifest hash: 188ad778308a2e5c885d452d7b7e61c082e8ceb2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCsG4wywK+sNU5EO8RAv+IAJ9sU87MythE/HYf3wH/V7ctzNdR1gCfclr9
ydsk6wtk/n6uKb4U7BvGvLM=
=5cOx
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Wed, 15 Jun 2005 10:06:40 -0800 |
parents | b4e0e20646bb |
children | 10519e4cbd02 |
comparison
equal
deleted
inserted
replaced
357:1cb3d9d5119e | 358:9f4077d7ef6f |
---|---|
111 self.mapcache = (node, map, flag) | 111 self.mapcache = (node, map, flag) |
112 return map | 112 return map |
113 | 113 |
114 def readflags(self, node): | 114 def readflags(self, node): |
115 if node == nullid: return {} # don't upset local cache | 115 if node == nullid: return {} # don't upset local cache |
116 if self.mapcache or self.mapcache[0] != node: | 116 if not self.mapcache or self.mapcache[0] != node: |
117 self.read(node) | 117 self.read(node) |
118 return self.mapcache[2] | 118 return self.mapcache[2] |
119 | 119 |
120 def diff(self, a, b): | 120 def diff(self, a, b): |
121 # this is sneaky, as we're not actually using a and b | 121 # this is sneaky, as we're not actually using a and b |