mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
manifest: remove manifestdelta optimization
Summary: Reading filectx info tried to use an optimization to get the filenode without uncompressing the whole manifest. In a tree world, this optimization actually hurts performance because it requires downloading the parent tree and performing a diff. Since everything is now treeonly, let's just drop this optimization. This helps in some Eden tests where they prefetch a specific commit then attempt to access it offline. Reviewed By: markbt Differential Revision: D15344433 fbshipit-source-id: 3b6ebc27ce7e263abefaa962856a4c7bea0df793
This commit is contained in:
parent
6210607c36
commit
3ad4fe7516
@ -341,9 +341,6 @@ class basectx(object):
|
||||
raise error.ManifestLookupError(
|
||||
self._node, path, _("not found in manifest")
|
||||
)
|
||||
if r"_manifestdelta" in self.__dict__ or path in self.files():
|
||||
if path in self._manifestdelta:
|
||||
return (self._manifestdelta[path], self._manifestdelta.flags(path))
|
||||
mfl = self._repo.manifestlog
|
||||
try:
|
||||
node, flag = mfl[self._changeset.manifest].find(path)
|
||||
@ -598,10 +595,6 @@ class changectx(basectx):
|
||||
self._repo.manifestlog.recentlinknode = self.node()
|
||||
return self._repo.manifestlog[self._changeset.manifest]
|
||||
|
||||
@propertycache
|
||||
def _manifestdelta(self):
|
||||
return self._manifestctx.readnew()
|
||||
|
||||
@propertycache
|
||||
def _parents(self):
|
||||
repo = self._repo
|
||||
|
@ -102,7 +102,6 @@ Make some non-conflicting commits in in the client repos.
|
||||
remote: *FULL* manifest read for 1e4ac5512124 (outside lock)
|
||||
remote: cached manifest read for 1e4ac5512124 (outside lock)
|
||||
remote: cached manifest read for 1e4ac5512124 (outside lock)
|
||||
remote: cached manifest read for 1e4ac5512124 (outside lock)
|
||||
remote: *FULL* manifest read for 8655e3409b0e (outside lock)
|
||||
remote: pushing 1 changeset:
|
||||
remote: 8ee8e01cbc17 third commit
|
||||
@ -199,7 +198,6 @@ Meanwhile, push from client2 -> server2.
|
||||
[client2 push] remote: *FULL* manifest read for 1e4ac5512124 (outside lock)
|
||||
[client2 push] remote: cached manifest read for 1e4ac5512124 (outside lock)
|
||||
[client2 push] remote: cached manifest read for 1e4ac5512124 (outside lock)
|
||||
[client2 push] remote: cached manifest read for 1e4ac5512124 (outside lock)
|
||||
[client2 push] remote: *FULL* manifest read for 8655e3409b0e (outside lock)
|
||||
[client2 push] remote: pushing 2 changesets:
|
||||
[client2 push] remote: 8ee8e01cbc17 third commit
|
||||
@ -224,7 +222,6 @@ Check that the first push is still running/blocked...
|
||||
[client1 push] remote: *FULL* manifest read for 8655e3409b0e (outside lock)
|
||||
[client1 push] remote: cached manifest read for 8655e3409b0e (outside lock)
|
||||
[client1 push] remote: cached manifest read for 8655e3409b0e (outside lock)
|
||||
[client1 push] remote: cached manifest read for 8655e3409b0e (outside lock)
|
||||
[client1 push] remote: pushing 1 changeset:
|
||||
[client1 push] remote: 0ee934622ec8 race loser
|
||||
[client1 push] remote: cached manifest read for 8655e3409b0e (*inside* lock)
|
||||
|
@ -150,7 +150,6 @@ blocking. There shouldn't be any "[client1 push]" output here.
|
||||
[client2 push] remote: (?)
|
||||
[client2 push] remote: read manifest outside the lock :)
|
||||
[client2 push] remote: read manifest outside the lock :)
|
||||
[client2 push] remote: read manifest outside the lock :)
|
||||
[client2 push] remote: pushing 1 changeset:
|
||||
[client2 push] remote: 4ab7e28729f6 c2 => yyy (second)
|
||||
[client2 push] remote: 2 new changesets from the server will be downloaded
|
||||
@ -185,7 +184,6 @@ Check that the first push is still running/blocked...
|
||||
[client1 push] remote: (?)
|
||||
[client1 push] remote: read manifest outside the lock :)
|
||||
[client1 push] remote: read manifest outside the lock :)
|
||||
[client1 push] remote: read manifest outside the lock :)
|
||||
[client1 push] remote: pushing 2 changesets:
|
||||
[client1 push] remote: 8cf3b846b3a4 c1 => xxx (third)
|
||||
[client1 push] remote: 1fe62957ca8a c1 => baz (fourth)
|
||||
|
@ -120,7 +120,7 @@ generated for the commit 'b9b574be2f5d' and its parent commit '9055b56f3916'.
|
||||
fetching tree '' 40f43426c87ba597f0d9553077c72fe06d4e2acb, found via 9055b56f3916
|
||||
fetching tree '' 85b359fdb09e9b8d7ac4a74551612b277345e8fd, found via 9055b56f3916
|
||||
2 trees fetched over * (glob)
|
||||
fetching tree '' 53c631458e338938766702d93d8bdd5c5d89b69f, based on 85b359fdb09e9b8d7ac4a74551612b277345e8fd, found via b9b574be2f5d
|
||||
fetching tree '' 53c631458e338938766702d93d8bdd5c5d89b69f, based on 85b359fdb09e9b8d7ac4a74551612b277345e8fd, found via 9055b56f3916
|
||||
changeset: 2:b9b574be2f5d
|
||||
user: test
|
||||
date: Thu Jan 01 00:00:00 1970 +0000
|
||||
@ -214,7 +214,7 @@ able to view it even with 'treemanifest.demandgenerate' being False.
|
||||
manifest for commit 'f7febcf0f689'.
|
||||
|
||||
$ hg log -vpr 'f7febcf0f689'
|
||||
fetching tree '' a6875e5fbf695d5fe67e03b8a5df2bab0e6dd045, based on 85b359fdb09e9b8d7ac4a74551612b277345e8fd, found via f7febcf0f689
|
||||
fetching tree '' a6875e5fbf695d5fe67e03b8a5df2bab0e6dd045, based on 85b359fdb09e9b8d7ac4a74551612b277345e8fd, found via 9055b56f3916
|
||||
changeset: 3:f7febcf0f689
|
||||
parent: 1:9055b56f3916
|
||||
user: test
|
||||
|
@ -223,7 +223,7 @@ Test pulling new commits from a hybrid server
|
||||
1 51 51 -1 1 c0196aba344d 85b359fdb09e 000000000000
|
||||
2 102 51 -1 2 0427baa4e948 85b359fdb09e 000000000000
|
||||
$ hg log -r tip --stat --pager=off
|
||||
fetching tree '' d9920715ba88cbc7962c4dac9f20004aafd94ac8, based on 85b359fdb09e9b8d7ac4a74551612b277345e8fd, found via 2937cde31c19
|
||||
fetching tree '' d9920715ba88cbc7962c4dac9f20004aafd94ac8, based on 85b359fdb09e9b8d7ac4a74551612b277345e8fd
|
||||
2 trees fetched over * (glob)
|
||||
changeset: 5:2937cde31c19
|
||||
tag: tip
|
||||
@ -476,7 +476,7 @@ Switch back to hybrid mode
|
||||
$ hg log -r 'last(public())' --stat
|
||||
fetching tree '' 85b359fdb09e9b8d7ac4a74551612b277345e8fd
|
||||
2 trees fetched over * (glob)
|
||||
fetching tree '' d9920715ba88cbc7962c4dac9f20004aafd94ac8, based on 85b359fdb09e9b8d7ac4a74551612b277345e8fd, found via 2937cde31c19
|
||||
fetching tree '' d9920715ba88cbc7962c4dac9f20004aafd94ac8, based on 85b359fdb09e9b8d7ac4a74551612b277345e8fd
|
||||
2 trees fetched over * (glob)
|
||||
changeset: 4:2937cde31c19
|
||||
parent: 0:2278cc8c6ce6
|
||||
@ -597,7 +597,7 @@ Test pulling to a treeonly client from a treeonly server
|
||||
$ hg log -r tip -T '{desc}\n' --stat
|
||||
fetching tree '' 83b03df1c9d62b8a2dedf46629e3262423af655c, based on d9920715ba88cbc7962c4dac9f20004aafd94ac8, found via 4f84204095e0
|
||||
1 trees fetched over * (glob)
|
||||
fetching tree '' bd5ff58fa887770ff0ea29dde0b91f5804cdeff0, based on 83b03df1c9d62b8a2dedf46629e3262423af655c, found via 5b1ec8639460
|
||||
fetching tree '' bd5ff58fa887770ff0ea29dde0b91f5804cdeff0, based on 83b03df1c9d62b8a2dedf46629e3262423af655c, found via 4f84204095e0
|
||||
2 trees fetched over * (glob)
|
||||
modify subdir/x again
|
||||
subdir/x | 1 +
|
||||
|
Loading…
Reference in New Issue
Block a user