mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 22:37:37 +03:00
6e7679fb0b
Summary: Previously filesystem._compareondisk relied on ctx.cmp(). Which inspected the size, read the content out of the store, and compared the store contents with what's on disk. This is expensive for a few reasons. 1) Fetching LFS file size from the store actually fetches the entire lfs blob, due to some unfortunate API design. This means we fetch the entire lfs blob, then look at the lfs pointer to get the size and completely ignore the blob. Then, if the size matches we later fetch the lfs blob *again* to compare it with what's on disk. We can fix the API later. For now let's circumvent ctx.cmp() and go straight to filelog.cmp() to skip the size check, since we already did a size check earlier in the status computation. 2) remotefilelog.cmp() requires that we have the store contents, which ends up requiring an expensive prefetch step. In reality we can do the cmp by computing the p1+p2+text hash of the contents on disk and comparing it with the filenode in the manifest. So let's change remotefilelog.cmp to use this method instead. This does require a history prefetch (so we have p1 and p2), but that's much cheaper than a content prefetch. Reviewed By: quark-zju Differential Revision: D34093036 fbshipit-source-id: 4a4386e59bca178ae58b10897c5cf68d3aa15dda |
||
---|---|---|
.. | ||
contrib | ||
distutils_rust | ||
doc | ||
edenscm | ||
edenscmnative | ||
exec | ||
hgcache_size_logger | ||
i18n | ||
lib | ||
newdoc | ||
pystubs | ||
slides | ||
tests | ||
.editorconfig | ||
.flake8 | ||
.gitignore | ||
.rustfmt.toml | ||
Cargo.toml | ||
COPYING | ||
fsprobe.sh | ||
gen_version.py | ||
hgeditor | ||
Makefile | ||
README.rst | ||
setup.py |
Mercurial ========= Mercurial is a fast, easy to use, distributed revision control tool for software developers. Basic install:: $ make # see install targets $ make install # do a system-wide install $ hg debuginstall # sanity-check setup $ hg # see help Running without installing:: $ make local # build for inplace usage $ ./hg --version # should show the latest version See https://mercurial-scm.org/ for detailed installation instructions, platform-specific notes, and Mercurial user information.