##// END OF EJS Templates
revlog: use compression engine API for compression...
revlog: use compression engine API for compression This commit swaps in the just-added revlog compressor API into the revlog class. Instead of implementing zlib compression inline in compress(), we now store a cached-on-first-use revlog compressor on each revlog instance and invoke its "compress()" method. As part of this, revlog.compress() has been refactored a bit to use a cleaner code flow and modern formatting (e.g. avoiding parenthesis around returned tuples). On a mozilla-unified repo, here are the "compress" times for a few commands: $ hg perfrevlogchunks -c ! wall 5.772450 comb 5.780000 user 5.780000 sys 0.000000 (best of 3) ! wall 5.795158 comb 5.790000 user 5.790000 sys 0.000000 (best of 3) $ hg perfrevlogchunks -m ! wall 9.975789 comb 9.970000 user 9.970000 sys 0.000000 (best of 3) ! wall 10.019505 comb 10.010000 user 10.010000 sys 0.000000 (best of 3) Compression times did seem to slow down just a little. There are 360,210 changelog revisions and 359,342 manifest revisions. For the changelog, mean time to compress a revision increased from ~16.025us to ~16.088us. That's basically a function call or an attribute lookup. I suppose this is the price you pay for abstraction. It's so low that I'm not concerned.

File last commit:

r25007:7c324f65 default
r30795:78ac56ae default
Show More
map-cmdline.bisect
14 lines | 849 B | text/plain | TextLexer
Jordi Gutiérrez Hermoso
map-cmdline.bisect: rewrite to just %include the default template...
r25007 %include map-cmdline.default
changeset = '{cset}{lbisect}{branches}{bookmarks}{tags}{parents}{user}{ldate}{summary}\n'
changeset_quiet = '{lshortbisect} {rev}:{node|short}\n'
changeset_verbose = '{cset}{lbisect}{branches}{bookmarks}{tags}{parents}{user}{ldate}{lfiles}{lfile_copies_switch}{description}\n'
changeset_debug = '{fullcset}{lbisect}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n'
# We take the zeroth word in order to omit "(implicit)" in the label
bisectlabel = ' bisect.{word('0', bisect)}'
lbisect ='{label("log.bisect{if(bisect, bisectlabel)}",
"bisect: {bisect}\n")}'
lshortbisect ='{label("log.bisect{if(bisect, bisectlabel)}",
"{bisect|shortbisect}")}'