Thu, 14 Jan 2016 10:02:34 -0800 diff: move status fixup earlier, out of _filepairs()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jan 2016 10:02:34 -0800] rev 27900
diff: move status fixup earlier, out of _filepairs() This prepares for future patches, and it also lets us remove the ugly "ctx1" argument to _filepairs() (ugly because of its assymmetry -- there's no "ctx2" argument).
Sun, 17 Jan 2016 19:33:02 +0100 graft: warn when -r is combined with revisions as positional arguments
Mads Kiilerich <madski@unity3d.com> [Sun, 17 Jan 2016 19:33:02 +0100] rev 27899
graft: warn when -r is combined with revisions as positional arguments The behaviour in this case is undefined. Instead of silently doing something "random" and surprising, at least issue a warning. (This should perhaps be considered a "deprecation" and turned into an error in a future release.)
Sun, 17 Jan 2016 19:33:02 +0100 graft: clarify in help that `-r` is not just optional
Mads Kiilerich <madski@unity3d.com> [Sun, 17 Jan 2016 19:33:02 +0100] rev 27898
graft: clarify in help that `-r` is not just optional Positional parameters are also treated as revisions, but the order of revisions matters and it will often be wrong if the user understands it as `-r` taking multiple revisions as `-r REV1 REV2`. (Alternatively, `-r` could be turned into a no-op flag as the documentation suggests. That would however be less "semantic markup" and I agree with the implementation in 55e7f352b1d3 but not the documentation.)
Thu, 14 Jan 2016 13:44:01 -0800 streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 14 Jan 2016 13:44:01 -0800] rev 27897
streamclone: use backgroundfilecloser (issue4889) Closing files that have been appended to is slow on Windows/NTFS. CloseHandle() calls on this platform often take 1-10ms - and that's on my i7-6700K Skylake processor with a modern and fast SSD. Contrast with other I/O operations, such as writing data, which take <100us. This means that creating/appending thousands of files can add significant overhead. For example, cloning mozilla-central creates ~232,000 revlog files. Assuming 1ms per CloseHandle(), that yields 232s (3:52) of wall time waiting for file closes! The impact of this overhead can be measured most directly when applying stream clone bundles. Applying these files is effectively uncompressing a tar archive (read: it's very fast). Using a RAM disk (read: no I/O wait), the difference in wall time for a `hg debugapplystreamclonebundle` for a ~1731 MB mozilla-central bundle between Windows and Linux from the same machine is drastic: Linux: ~12.8s (128MB/s) Windows: ~352.0s (4.7MB/s) Windows is ~27.5x slower. Yikes! After this patch: Linux: ~12.8s (128MB/s) Windows: ~102.1s (16.1MB/s) Windows is now ~3.4x faster. Unfortunately, it is still ~8x slower than Linux. Profiling reveals a few hot code paths that could likely be improved. But those are for other patches. This patch introduces test-clone-uncompressed.t because existing tests of `clone --uncompressed` are scattered about and adding a variation for background thread closing to e.g. test-http.t doesn't feel correct.
Sat, 02 Jan 2016 16:11:36 -0800 streamclone: indent code
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Jan 2016 16:11:36 -0800] rev 27896
streamclone: indent code This will make the subsequent patch easier to read.
Thu, 14 Jan 2016 13:34:59 -0800 scmutil: support background file closing
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 14 Jan 2016 13:34:59 -0800] rev 27895
scmutil: support background file closing Closing files that have been appended to is relatively slow on Windows/NTFS. This makes several Mercurial operations slower on Windows. The workaround to this issue is conceptually simple: use multiple threads for I/O. Unfortunately, Python doesn't scale well to multiple threads because of the GIL. And, refactoring our code to use threads everywhere would be a huge undertaking. So, we decide to tackle this problem by starting small: establishing a thread pool for closing files. This patch establishes a mechanism for closing file handles on separate threads. The coordinator object is basically a queue of file handles to operate on and a thread pool consuming from the queue. When files are opened through the VFS layer, the caller can specify that delay closing is allowed. A proxy class for file handles has been added. We must use a proxy because it isn't possible to modify __class__ on built-in types. This adds some overhead. But as future patches will show, this overhead is cancelled out by the benefit of closing file handles on background threads.
Tue, 12 Jan 2016 23:56:48 +0900 templatekw: add {namespaces} keyword
Yuya Nishihara <yuya@tcha.org> [Tue, 12 Jan 2016 23:56:48 +0900] rev 27894
templatekw: add {namespaces} keyword This provides a general-purpose interface to all custom namespaces. The {namespaces} keyword honors the definition order of namespaces as they are kept by sortdict.
Tue, 12 Jan 2016 23:53:56 +0900 templatekw: move shownames() helper to be sorted alphabetically
Yuya Nishihara <yuya@tcha.org> [Tue, 12 Jan 2016 23:53:56 +0900] rev 27893
templatekw: move shownames() helper to be sorted alphabetically I'll add shownamespaces(), which is similar to this function. I want to put them nearby.
Sat, 16 Jan 2016 13:53:32 +0900 templater: make get(dict, key) return a single value
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jan 2016 13:53:32 +0900] rev 27892
templater: make get(dict, key) return a single value This is necessary to obtain a _hybrid object from a dict. If get() yields a value, it would be stringified. I see no benefit to make get() lazy, so this patch just changes "yield" to "return".
Sat, 16 Jan 2016 13:42:37 +0900 templater: make _hybrid not callable to avoid conflicting semantics
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jan 2016 13:42:37 +0900] rev 27891
templater: make _hybrid not callable to avoid conflicting semantics In templater, a callable symbol exists for lazy evaluation, which should have f(**mapping) signature. On the other hand, _hybrid.__call__(), which was introduced by 0b241d7a8c62, generates mapping for each element. This patch renames _hybrid.__call__() to _hybrid.itermaps() so that a _hybrid object can be a value of a mapping dict. {namespaces % "{namespace}: {names % "{name }"}\n"} ~~~~~ a _hybrid object
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip