mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
[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-----
This commit is contained in:
parent
69c0c6f65d
commit
f82d510aa2
@ -113,7 +113,7 @@ class manifest(revlog):
|
||||
|
||||
def readflags(self, node):
|
||||
if node == nullid: return {} # don't upset local cache
|
||||
if self.mapcache or self.mapcache[0] != node:
|
||||
if not self.mapcache or self.mapcache[0] != node:
|
||||
self.read(node)
|
||||
return self.mapcache[2]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user