- May 06, 2017
-
-
Gregory Szorc authored
-
Gregory Szorc authored
This completes our rename of internal revlog methods to distinguish between low-level raw revlog data "segments" and higher-level, per-revision "chunks." perf.py has been updated to consult both names so it will work against older Mercurial versions.
-
Gregory Szorc authored
To prepare for renaming revlog._chunkraw, we stuff a reference to this metho in a local variable. This does 2 things. First, it moves the attribute lookup outside of a loop, which more accurately measures the time of the code being invoked. Second, it allows us to alias to different methods depending on their presence (perf.py needs to support running against old Mercurial versions). Removing an attribute lookup from a tigh loop appears to shift the numbers slightly with mozilla-central: $ hg perfrevlogchunks -c ! read ! wall 0.354789 comb 0.340000 user 0.330000 sys 0.010000 (best of 28) ! wall 0.335932 comb 0.330000 user 0.290000 sys 0.040000 (best of 30) ! read w/ reused fd ! wall 0.342326 comb 0.340000 user 0.320000 sys 0.020000 (best of 29) ! wall 0.332857 comb 0.340000 user 0.290000 sys 0.050000 (best of 30) ! read batch ! wall 0.023623 comb 0.020000 user 0.000000 sys 0.020000 (best of 124) ! wall 0.023666 comb 0.020000 user 0.000000 sys 0.020000 (best of 125) ! read batch w/ reused fd ! wall 0.023828 comb 0.020000 user 0.000000 sys 0.020000 (best of 124) ! wall 0.023556 comb 0.020000 user 0.000000 sys 0.020000 (best of 126)
-
Gregory Szorc authored
Currently, "chunk" is overloaded in revlog terminology to mean multiple things. One of them refers to a segment of raw data from the revlog. This commit renames various methods only used within revlog.py to have "segment" in their name instead of "chunk." While I was here, I also made the names more descriptive. e.g. "_loadchunk()" becomes "_readsegment()" because it actually does I/O.
-
Jun Wu authored
In the future, chg may prefill repo's dirstate filecache so it's valuable and should be kept. Previously we drop both filecache and property cache for dirstate during fsmonitor reposetup, this patch changes it to only drop property cache but keep the filecache.
-
Gregory Szorc authored
This is more consistent with other perf* functions.
-
Gregory Szorc authored
Previously, the "startrev" argument would be ignored due to "startrev = 0" in the benchmark function. This meant that `hg perfrevlog` always started at revision 0. Rename the local variable to "beginrev" so the variable does the right thing.
-
- May 05, 2017
-
-
Pierre-Yves David authored
This should help performance when unbundling.
-
Pierre-Yves David authored
This will help us reusing the logic for `hg bundle`.
-
Pierre-Yves David authored
The current function ('writebundle') is focussing on getting an existing changegroup to disk. It is no easy ways to includes more part in the generated bundle2. So we introduce a slightly higher level function that is fed the 'outgoing' object (that defines the bundled spec) and the bundlespec parameters (to control the changegroup generation and inclusion of other parts). This is creating the third logic dedicated to create a consistent bundle2 (the other 2 are the push code and the getbundle code). We should probably reconcile them at some points but they all takes different types of input. So we need to introduce an intermediate "object" that each different input could be converted to. Such unified "bundle2 specification" could be fed to some unified code. We start by having the `hg bundle` related code on its own to helps defines its specific needs first. Once the common and specific parts of each logic will be known we can start unification.
-
- May 04, 2017
-
-
Pierre-Yves David authored
We can also handle that part before starting any generation.
-
Pierre-Yves David authored
We can check if we know how to bundle this changegroup version before actually starting to generate the changegroup.
-
Pierre-Yves David authored
We already have the information so we can check it earlier.
-
- May 07, 2017
-
-
Matt Harbison authored
In theory, it should be enough to pay attention only to the modification time when detecting if a snapshotted working directory file changed. In practice, BeyondCompare preserves all file attributes when syncing files at the directory level. (If you open the file and sync individual hunks, then mtime does change, and everything was being copied back as desired.) I'm not sure how many other synchronization tools would trigger this issue, but it's annoyingly inconsistent (if a single file is diffed, it isn't snapshotted, so the same BeyondCompare file sync operation _is_ visible, because wdir() is updated in place. I filed a bug with them, and they stated it is on their wish list, but won't be fixed in the near term. This isn't a complete fix (there is still the case of the size not changing), but this seems like a trivial enough change to fix most of the problem. I suppose we could fool around with making files in the other snapshot readonly, and copy back if we see the readonly bit copied. That seems pretty hacky though, and only works if the external tool copies all attributes.
-
Matt Harbison authored
-
- May 06, 2017
-
-
Matt Harbison authored
Now that output can be conditionalized, the few `chmod +x` specific outputs can be conditionalized, and the rest of the tests run as normal. Disable one test that is failing on Windows for now.
-
Matt Harbison authored
-
Matt Harbison authored
-
- Aug 13, 2016
-
-
Yuya Nishihara authored
So we can switch cext/pure modules to new layout one by one.
-
- Aug 12, 2016
-
-
Yuya Nishihara authored
I'm going to restructure cext/pure modules and get rid of our hgimporter hack. C extension modules will be moved to cext/ directory so old and new compiled modules can coexist in development tree. This is necessary to run 'hg bisect' without recompiling. New extension modules will be loaded by an importer function: base85 = policy.importmod('base85') # select pure.base85 or cext.base85 This will also allow us to split cffi from pure modules, which is currently difficult because pure modules can't be imported by name.
-
- May 02, 2017
-
-
Yuya Nishihara authored
The policy module won't be imported early in future, which means string literals will be processed by our Python 3 loader.
-
- Apr 26, 2017
-
-
Yuya Nishihara authored
This check is useless in pure installation and I want to make it directly import C extension modules.
-
Yuya Nishihara authored
See the previous commit for why. Marked as API change since osutil.listdir() seems widely used in third-party extensions. The win32mbcs extension is updated to wrap both util. and windows. aliases.
-
Yuya Nishihara authored
See the previous commit for why.
-
Yuya Nishihara authored
See the previous commit for why. mdiff seems a good place to host bdiff functions. bdiff.bdiff was already aliased as textdiff, so we use it.
-
Yuya Nishihara authored
I'm going to replace hgimporter with a simpler import function, so we can access to pure/cext modules by name: # util.py base85 = policy.importmod('base85') # select pure.base85 or cext.base85 # cffi/base85.py from ..pure.base85 import * # may re-export pure.base85 functions This means we'll have to use policy.importmod() function in place of the standard import statement, but we wouldn't want to write it every place where C extension modules are used. So this patch makes util host base85 functions.
-
- May 02, 2017
-
-
Yuya Nishihara authored
This style seems more common in our codebase.
-
Yuya Nishihara authored
-
- May 08, 2017
-
-
Durham Goode authored
The old tree stripping logic iterated over every tree revlog in the repo looking for commits that had revs to be stripped. That's very inefficient in large repos. Instead, let's look at what files are touched by the strip and only inspect those revlogs. I don't have actual perf numbers, since internally we don't use a true treemanifest, but simply iterating over hundreds of thousands of revlogs takes many, many seconds, so this should help tremendously when stripping only a few commits.
-
Durham Goode authored
This will allow external extensions to modify tree strip behavior more precisely.
-
Martin von Zweigbergk authored
The last use seems to have gone away in 7c7d845f8b64 (manifest: make manifestlog use it's own cache, 2016-11-10).
-
- May 04, 2017
-
-
Pulkit Goyal authored
The keys are passed here and there as unicodes and our transformer make things bytes. Due to that, mq was not poped and this results in error on Py3. Here we abuse r'' to make that str on Python 3.
-
Pulkit Goyal authored
-
Jun Wu authored
When diffing binary contents, with certain configs, we can show "Binary file <name> has changed" without actual content. That allows a fast path where we could avoid providing actual binary contents. Note: in that case we still need to test if two contents are the same, that's done by using "filectx.cmp", which could have its own fast path.
-
- May 06, 2017
-
-
Jun Wu authored
This seems to be more correct given the table drawn in the previous patch. Namely, "losedatafn" and "opts.git" are removed, "not opts.text" is added. - losedatafn: diff output (binary) should not be affected by "losedatafn" - opts.git: binary testing is helpful for detecting a fast path in the next path. the fast path can also be used if opts.git is False - opts.text: if it's set, we should treat the content as non-binary
-
- May 05, 2017
-
-
Jun Wu authored
The table should make it easier to reason about future changes.
-
- May 04, 2017
-
-
Jun Wu authored
fctx.size() could have a fast path that does not require loading content.
-
Jun Wu authored
The end goal is to avoid calling fctx.data() when unnecessary. For example, if diff.nobinary=1 and files are binary, the expected behavior is to print "Binary file has changed". That could avoid reading fctx.data() sometimes. This is mainly to enable an external LFS extension to skip expensive binary file loading sometimes (read: most of the time with diff.nobinary=1 and diff.text=0), without any behavior changes to mercurial (i.e. whether a file is LFS or not does not change any behavior, LFS could be 100% transparent to users).
-
- Apr 20, 2017
-
-
Yuya Nishihara authored
It uses "raise excobj, None, tb" form which I think is simpler and more useful than "raise exctype, args, tb".
-
- May 01, 2017
-
-
Yuya Nishihara authored
These are valid uses of os.environ.
-