##// END OF EJS Templates
revlog: make compressed size comparisons consistent...
revlog: make compressed size comparisons consistent revlog.compress() compares the compressed size to the input size and throws away the compressed data if it is larger than the input. This is the correct thing to do, as storing compressed data that is larger than the input takes up more storage space and makes reading slower. However, the comparison was implemented inconsistently. For the streaming compression mode, we threw away the result if it was greater than or equal to the input size. But for the one-shot compression, we threw away the compression only if it was greater than the input size! This patch changes the comparison for the simple case so it is consistent with the streaming case. As a few tests demonstrate, this adds 1 byte to some revlog entries. This is because of an added 'u' header on the chunk. It seems somewhat wrong to increase the revlog size here. However, IMO the cost of 1 byte in storage is insignificant compared to the performance gains of avoiding decompression. This patch should invite questions around the heuristic for throwing away compressed data. For example, I'd argue we should be more liberal about rejecting compressed data, additionally doing so where the number of bytes saved fails to reach a threshold. But we can have this discussion another time.

File last commit:

r26151:0dda3692 stable
r30792:4215dc1b default
Show More
help.tmpl
38 lines | 1.6 KiB | application/x-cheetah | CheetahLexer
Augie Fackler
web: add a help view for getting hg help output
r12666 {header}
av6
hgweb: fix help pages title in gitweb and monoblue...
r25686 <title>Help: {topic}</title>
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <link rel="alternate" type="application/atom+xml" href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}"/>
<link rel="alternate" type="application/rss+xml" href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}"/>
Augie Fackler
web: add a help view for getting hg help output
r12666 </head>
<body>
<div id="container">
<div class="page-header">
Angel Ezquerra <angel.ezquerra at gmail.com>
hgweb: add a "URL breadcrumb" to the index and repository pages...
r18258 <h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb} / help</h1>
Augie Fackler
web: add a help view for getting hg help output
r12666
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <form action="{url|urlescape}log">
Augie Fackler
web: add a help view for getting hg help output
r12666 {sessionvars%hiddenformentry}
<dl class="search">
<dt><label>Search: </label></dt>
<dd><input type="text" name="rev" /></dd>
</dl>
</form>
<ul class="page-nav">
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <li><a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a></li>
<li><a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a></li>
<li><a href="{url|urlescape}changelog{sessionvars%urlparameter}">changelog</a></li>
av6
hgweb: don't point graph links at tip hash where it doesn't make sense...
r25525 <li><a href="{url|urlescape}graph{sessionvars%urlparameter}">graph</a></li>
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li>
<li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
<li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
av6
hgweb: don't point file links at tip hash where it doesn't make sense...
r25526 <li><a href="{url|urlescape}file{sessionvars%urlparameter}">files</a></li>
Anton Shestakov
hgweb: don't mix tabs and spaces in monoblue templates
r24129 <li class="current">help</li>
Augie Fackler
web: add a help view for getting hg help output
r12666 </ul>
</div>
av6
monoblue: fix page subtitle on help pages
r26151 <h2 class="no-link no-border">help</h2>
Dan Villiom Podlaski Christiansen
hgweb: generate HTML documentation...
r18747 <div id="doc">
{rstdoc(doc, "html")}
</div>
Augie Fackler
web: add a help view for getting hg help output
r12666
{footer}