##// END OF EJS Templates
repo: avoid copying/updating a dict on every `repo.__getitem__`...
repo: avoid copying/updating a dict on every `repo.__getitem__` This has some mild performance benefits. I'm looking into a pathological case where one of our `hg log` invocations takes several seconds, and according to hyperfine this reduces the wall time of the entire operation (running in chg) from: ``` Time (mean ± σ): 7.390 s ± 0.106 s [User: 7.058 s, System: 0.271 s] Range (min … max): 7.300 s … 7.625 s ``` to: ``` Time (mean ± σ): 7.046 s ± 0.091 s [User: 6.714 s, System: 0.279 s] Range (min … max): 6.916 s … 7.169 s ``` Note: the log command is slow due to an issue in our custom stuff executing `repo[<arg>]` 298,800 times. This performance improvement is likely not noticeable during normal operation, but I don't feel like it's making the code more difficult to understand, and every small bit helps. Differential Revision: https://phab.mercurial-scm.org/D9022
Kyle Lippincott -
r46036:4a0ccbec default
Show More
Name Size Modified Last Commit Author
/ mercurial / helptext / internals
__init__.py Loading ...
bid-merge.txt Loading ...
bundle2.txt Loading ...
bundles.txt Loading ...
cbor.txt Loading ...
censor.txt Loading ...
changegroups.txt Loading ...
config.txt Loading ...
extensions.txt Loading ...
linelog.txt Loading ...
mergestate.txt Loading ...
requirements.txt Loading ...
revlogs.txt Loading ...
wireprotocol.txt Loading ...
wireprotocolrpc.txt Loading ...
wireprotocolv2.txt Loading ...