##// END OF EJS Templates
util: implement zstd compression engine...
util: implement zstd compression engine Now that zstd is vendored and being built (in some configurations), we can implement a compression engine for zstd! The zstd engine is a little different from existing engines. Because it may not always be present, we have to defer load the module in case importing it fails. We facilitate this via a cached property that holds a reference to the module or None. The "available" method is implemented to reflect reality. The zstd engine declares its ability to handle bundles using the "zstd" human name and the "ZS" internal name. The latter was chosen because internal names are 2 characters (by only convention I think) and "ZS" seems reasonable. The engine, like others, supports specifying the compression level. However, there are no consumers of this API that yet pass in that argument. I have plans to change that, so stay tuned. Since all we need to do to support bundle generation with a new compression engine is implement and register the compression engine, bundle generation with zstd "just works!" Tests demonstrating this have been added. How does performance of zstd for bundle generation compare? On the mozilla-unified repo, `hg bundle --all -t <engine>-v2` yields the following on my i7-6700K on Linux: engine CPU time bundle size vs orig size throughput none 97.0s 4,054,405,584 100.0% 41.8 MB/s bzip2 (l=9) 393.6s 975,343,098 24.0% 10.3 MB/s gzip (l=6) 184.0s 1,140,533,074 28.1% 22.0 MB/s zstd (l=1) 108.2s 1,119,434,718 27.6% 37.5 MB/s zstd (l=2) 111.3s 1,078,328,002 26.6% 36.4 MB/s zstd (l=3) 113.7s 1,011,823,727 25.0% 35.7 MB/s zstd (l=4) 116.0s 1,008,965,888 24.9% 35.0 MB/s zstd (l=5) 121.0s 977,203,148 24.1% 33.5 MB/s zstd (l=6) 131.7s 927,360,198 22.9% 30.8 MB/s zstd (l=7) 139.0s 912,808,505 22.5% 29.2 MB/s zstd (l=12) 198.1s 854,527,714 21.1% 20.5 MB/s zstd (l=18) 681.6s 789,750,690 19.5% 5.9 MB/s On compression, zstd for bundle generation delivers: * better compression than gzip with significantly less CPU utilization * better than bzip2 compression ratios while still being significantly faster than gzip * ability to aggressively tune compression level to achieve significantly smaller bundles That last point is important. With clone bundles, a server can pre-generate a bundle file, upload it to a static file server, and redirect clients to transparently download it during clone. The server could choose to produce a zstd bundle with the highest compression settings possible. This would take a very long time - a magnitude longer than a typical zstd bundle generation - but the result would be hundreds of megabytes smaller! For the clone volume we do at Mozilla, this could translate to petabytes of bandwidth savings per year and faster clones (due to smaller transfer size). I don't have detailed numbers to report on decompression. However, zstd decompression is fast: >1 GB/s output throughput on this machine, even through the Python bindings. And it can do that regardless of the compression level of the input. By the time you have enough data to worry about overhead of decompression, you have plenty of other things to worry about performance wise. zstd is wins all around. I can't wait to implement support for it on the wire protocol and in revlogs.

File last commit:

r27384:2f63ae14 default
r30442:41a81067 default
Show More
templates.wxs
245 lines | 14.0 KiB | text/plain | TextLexer
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <?xml version="1.0" encoding="utf-8"?>
Adrian Buehlmann
contrib/wix: switch *.wxs files to LF eol
r10513 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828
<?include guids.wxi ?>
Steve Borho
wix: add support for x64 native MSI packages
r13042 <?include defines.wxi ?>
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828
<Fragment>
<ComponentGroup Id="templatesFolder">
<ComponentRef Id="templates.root" />
<ComponentRef Id="templates.atom" />
<ComponentRef Id="templates.coal" />
<ComponentRef Id="templates.gitweb" />
Steve Borho
wix: add new json templates folder to MSI installers
r24989 <ComponentRef Id="templates.json" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <ComponentRef Id="templates.monoblue" />
<ComponentRef Id="templates.paper" />
<ComponentRef Id="templates.raw" />
<ComponentRef Id="templates.rss" />
<ComponentRef Id="templates.spartan" />
<ComponentRef Id="templates.static" />
</ComponentGroup>
</Fragment>
<Fragment>
<DirectoryRef Id="INSTALLDIR">
<Directory Id="templatesdir" Name="templates" FileSource="$(var.SourceDir)">
Steve Borho
wix: add support for x64 native MSI packages
r13042 <Component Id="templates.root" Guid="$(var.templates.root.guid)" Win64='$(var.IsX64)'>
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Name="map-cmdline.changelog" KeyPath="yes" />
<File Name="map-cmdline.compact" />
<File Name="map-cmdline.default" />
Steve Borho
wix: add map-commandline.bisect
r15764 <File Name="map-cmdline.bisect" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Name="map-cmdline.xml" />
Matt Mackall
wix: add missing template
r27384 <File Name="map-cmdline.status" />
Steve Borho
wix: pull in new templates
r20315 <File Name="map-cmdline.phases" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 </Component>
Steve Borho
wix: add new json templates folder to MSI installers
r24989 <Directory Id="templates.jsondir" Name="json">
<Component Id="templates.json" Guid="$(var.templates.json.guid)" Win64='$(var.IsX64)'>
<File Id="json.changelist.tmpl" Name="changelist.tmpl" KeyPath="yes" />
<File Id="json.map" Name="map" />
</Component>
</Directory>
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <Directory Id="templates.atomdir" Name="atom">
Steve Borho
wix: add support for x64 native MSI packages
r13042 <Component Id="templates.atom" Guid="$(var.templates.atom.guid)" Win64='$(var.IsX64)'>
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="atom.changelog.tmpl" Name="changelog.tmpl" KeyPath="yes" />
<File Id="atom.changelogentry.tmpl" Name="changelogentry.tmpl" />
<File Id="atom.error.tmpl" Name="error.tmpl" />
<File Id="atom.filelog.tmpl" Name="filelog.tmpl" />
<File Id="atom.header.tmpl" Name="header.tmpl" />
<File Id="atom.map" Name="map" />
<File Id="atom.tagentry.tmpl" Name="tagentry.tmpl" />
<File Id="atom.tags.tmpl" Name="tags.tmpl" />
Steve Borho
wix: pull in new templates
r20315 <File Id="atom.branchentry.tmpl" Name="branchentry.tmpl" />
<File Id="atom.branches.tmpl" Name="branches.tmpl" />
Steve Borho
wix: catch up with more added files...
r14819 <File Id="atom.bookmarks.tmpl" Name="bookmarks.tmpl" />
<File Id="atom.bookmarkentry.tmpl" Name="bookmarkentry.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 </Component>
</Directory>
<Directory Id="templates.coaldir" Name="coal">
Steve Borho
wix: add support for x64 native MSI packages
r13042 <Component Id="templates.coal" Guid="$(var.templates.coal.guid)" Win64='$(var.IsX64)'>
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="coal.header.tmpl" Name="header.tmpl" KeyPath="yes" />
<File Id="coal.map" Name="map" />
</Component>
</Directory>
<Directory Id="templates.gitwebdir" Name="gitweb">
Steve Borho
wix: add support for x64 native MSI packages
r13042 <Component Id="templates.gitweb" Guid="$(var.templates.gitweb.guid)" Win64='$(var.IsX64)'>
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="gitweb.branches.tmpl" Name="branches.tmpl" KeyPath="yes" />
Steve Borho
wix: catch up with more added files...
r14819 <File Id="gitweb.bookmarks.tmpl" Name="bookmarks.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="gitweb.changelog.tmpl" Name="changelog.tmpl" />
<File Id="gitweb.changelogentry.tmpl" Name="changelogentry.tmpl" />
<File Id="gitweb.changeset.tmpl" Name="changeset.tmpl" />
<File Id="gitweb.error.tmpl" Name="error.tmpl" />
<File Id="gitweb.fileannotate.tmpl" Name="fileannotate.tmpl" />
Steve Borho
wix: pick up new template files
r17420 <File Id="gitweb.filecomparison.tmpl" Name="filecomparison.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="gitweb.filediff.tmpl" Name="filediff.tmpl" />
<File Id="gitweb.filelog.tmpl" Name="filelog.tmpl" />
<File Id="gitweb.filerevision.tmpl" Name="filerevision.tmpl" />
<File Id="gitweb.footer.tmpl" Name="footer.tmpl" />
<File Id="gitweb.graph.tmpl" Name="graph.tmpl" />
<File Id="gitweb.header.tmpl" Name="header.tmpl" />
<File Id="gitweb.index.tmpl" Name="index.tmpl" />
<File Id="gitweb.manifest.tmpl" Name="manifest.tmpl" />
<File Id="gitweb.map" Name="map" />
<File Id="gitweb.notfound.tmpl" Name="notfound.tmpl" />
<File Id="gitweb.search.tmpl" Name="search.tmpl" />
<File Id="gitweb.shortlog.tmpl" Name="shortlog.tmpl" />
<File Id="gitweb.summary.tmpl" Name="summary.tmpl" />
<File Id="gitweb.tags.tmpl" Name="tags.tmpl" />
Steve Borho
wix: add new help page templates
r12791 <File Id="gitweb.help.tmpl" Name="help.tmpl" />
<File Id="gitweb.helptopics.tmpl" Name="helptopics.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 </Component>
</Directory>
<Directory Id="templates.monobluedir" Name="monoblue">
Steve Borho
wix: add support for x64 native MSI packages
r13042 <Component Id="templates.monoblue" Guid="$(var.templates.monoblue.guid)" Win64='$(var.IsX64)'>
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="monoblue.branches.tmpl" Name="branches.tmpl" KeyPath="yes" />
Steve Borho
wix: catch up with more added files...
r14819 <File Id="monoblue.bookmarks.tmpl" Name="bookmarks.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="monoblue.changelog.tmpl" Name="changelog.tmpl" />
<File Id="monoblue.changelogentry.tmpl" Name="changelogentry.tmpl" />
<File Id="monoblue.changeset.tmpl" Name="changeset.tmpl" />
<File Id="monoblue.error.tmpl" Name="error.tmpl" />
<File Id="monoblue.fileannotate.tmpl" Name="fileannotate.tmpl" />
Steve Borho
wix: pick up new template files
r17420 <File Id="monoblue.filecomparison.tmpl" Name="filecomparison.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="monoblue.filediff.tmpl" Name="filediff.tmpl" />
<File Id="monoblue.filelog.tmpl" Name="filelog.tmpl" />
<File Id="monoblue.filerevision.tmpl" Name="filerevision.tmpl" />
<File Id="monoblue.footer.tmpl" Name="footer.tmpl" />
<File Id="monoblue.graph.tmpl" Name="graph.tmpl" />
<File Id="monoblue.header.tmpl" Name="header.tmpl" />
<File Id="monoblue.index.tmpl" Name="index.tmpl" />
<File Id="monoblue.manifest.tmpl" Name="manifest.tmpl" />
<File Id="monoblue.map" Name="map" />
<File Id="monoblue.notfound.tmpl" Name="notfound.tmpl" />
<File Id="monoblue.search.tmpl" Name="search.tmpl" />
<File Id="monoblue.shortlog.tmpl" Name="shortlog.tmpl" />
<File Id="monoblue.summary.tmpl" Name="summary.tmpl" />
<File Id="monoblue.tags.tmpl" Name="tags.tmpl" />
Steve Borho
wix: add new help page templates
r12791 <File Id="monoblue.help.tmpl" Name="help.tmpl" />
<File Id="monoblue.helptopics.tmpl" Name="helptopics.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 </Component>
</Directory>
<Directory Id="templates.paperdir" Name="paper">
Steve Borho
wix: add support for x64 native MSI packages
r13042 <Component Id="templates.paper" Guid="$(var.templates.paper.guid)" Win64='$(var.IsX64)'>
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="paper.branches.tmpl" Name="branches.tmpl" KeyPath="yes" />
Steve Borho
wix: add new file templates/paper/bookmarks.tmpl...
r13695 <File Id="paper.bookmarks.tmpl" Name="bookmarks.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="paper.changeset.tmpl" Name="changeset.tmpl" />
Adrian Buehlmann
wix: add missing templates/paper/diffstat.tmpl
r14772 <File Id="paper.diffstat.tmpl" Name="diffstat.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="paper.error.tmpl" Name="error.tmpl" />
<File Id="paper.fileannotate.tmpl" Name="fileannotate.tmpl" />
Steve Borho
wix: pick up new template files
r17420 <File Id="paper.filecomparison.tmpl" Name="filecomparison.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="paper.filediff.tmpl" Name="filediff.tmpl" />
<File Id="paper.filelog.tmpl" Name="filelog.tmpl" />
<File Id="paper.filelogentry.tmpl" Name="filelogentry.tmpl" />
<File Id="paper.filerevision.tmpl" Name="filerevision.tmpl" />
<File Id="paper.footer.tmpl" Name="footer.tmpl" />
<File Id="paper.graph.tmpl" Name="graph.tmpl" />
<File Id="paper.header.tmpl" Name="header.tmpl" />
<File Id="paper.index.tmpl" Name="index.tmpl" />
<File Id="paper.manifest.tmpl" Name="manifest.tmpl" />
<File Id="paper.map" Name="map" />
<File Id="paper.notfound.tmpl" Name="notfound.tmpl" />
<File Id="paper.search.tmpl" Name="search.tmpl" />
<File Id="paper.shortlog.tmpl" Name="shortlog.tmpl" />
<File Id="paper.shortlogentry.tmpl" Name="shortlogentry.tmpl" />
<File Id="paper.tags.tmpl" Name="tags.tmpl" />
Steve Borho
wix: add new help page templates
r12791 <File Id="paper.help.tmpl" Name="help.tmpl" />
<File Id="paper.helptopics.tmpl" Name="helptopics.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 </Component>
</Directory>
<Directory Id="templates.rawdir" Name="raw">
Steve Borho
wix: add support for x64 native MSI packages
r13042 <Component Id="templates.raw" Guid="$(var.templates.raw.guid)" Win64='$(var.IsX64)'>
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="raw.changeset.tmpl" Name="changeset.tmpl" KeyPath="yes" />
<File Id="raw.error.tmpl" Name="error.tmpl" />
<File Id="raw.fileannotate.tmpl" Name="fileannotate.tmpl" />
<File Id="raw.filediff.tmpl" Name="filediff.tmpl" />
Steve Borho
wix: pick up new template files
r17420 <File Id="raw.graph.tmpl" Name="graph.tmpl" />
<File Id="raw.graphedge.tmpl" Name="graphedge.tmpl" />
<File Id="raw.graphnode.tmpl" Name="graphnode.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="raw.index.tmpl" Name="index.tmpl" />
<File Id="raw.manifest.tmpl" Name="manifest.tmpl" />
<File Id="raw.map" Name="map" />
<File Id="raw.notfound.tmpl" Name="notfound.tmpl" />
Steve Borho
wix: pull in new templates
r20315 <File Id="raw.search.tmpl" Name="search.tmpl" />
<File Id="raw.logentry.tmpl" Name="logentry.tmpl" />
<File Id="raw.changelog.tmpl" Name="changelog.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 </Component>
</Directory>
<Directory Id="templates.rssdir" Name="rss">
Steve Borho
wix: add support for x64 native MSI packages
r13042 <Component Id="templates.rss" Guid="$(var.templates.rss.guid)" Win64='$(var.IsX64)'>
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="rss.changelog.tmpl" Name="changelog.tmpl" KeyPath="yes" />
<File Id="rss.changelogentry.tmpl" Name="changelogentry.tmpl" />
<File Id="rss.error.tmpl" Name="error.tmpl" />
<File Id="rss.filelog.tmpl" Name="filelog.tmpl" />
<File Id="rss.filelogentry.tmpl" Name="filelogentry.tmpl" />
<File Id="rss.header.tmpl" Name="header.tmpl" />
<File Id="rss.map" Name="map" />
<File Id="rss.tagentry.tmpl" Name="tagentry.tmpl" />
<File Id="rss.tags.tmpl" Name="tags.tmpl" />
Steve Borho
wix: catch up with more added files...
r14819 <File Id="rss.bookmarks.tmpl" Name="bookmarks.tmpl" />
<File Id="rss.bookmarkentry.tmpl" Name="bookmarkentry.tmpl" />
Steve Borho
wix: pull in new templates
r20315 <File Id="rss.branchentry.tmpl" Name="branchentry.tmpl" />
<File Id="rss.branches.tmpl" Name="branches.tmpl" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 </Component>
</Directory>
<Directory Id="templates.spartandir" Name="spartan">
Steve Borho
wix: add support for x64 native MSI packages
r13042 <Component Id="templates.spartan" Guid="$(var.templates.spartan.guid)" Win64='$(var.IsX64)'>
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="spartan.branches.tmpl" Name="branches.tmpl" KeyPath="yes" />
<File Id="spartan.changelog.tmpl" Name="changelog.tmpl" />
<File Id="spartan.changelogentry.tmpl" Name="changelogentry.tmpl" />
<File Id="spartan.changeset.tmpl" Name="changeset.tmpl" />
<File Id="spartan.error.tmpl" Name="error.tmpl" />
<File Id="spartan.fileannotate.tmpl" Name="fileannotate.tmpl" />
<File Id="spartan.filediff.tmpl" Name="filediff.tmpl" />
<File Id="spartan.filelog.tmpl" Name="filelog.tmpl" />
<File Id="spartan.filelogentry.tmpl" Name="filelogentry.tmpl" />
<File Id="spartan.filerevision.tmpl" Name="filerevision.tmpl" />
<File Id="spartan.footer.tmpl" Name="footer.tmpl" />
<File Id="spartan.graph.tmpl" Name="graph.tmpl" />
<File Id="spartan.header.tmpl" Name="header.tmpl" />
<File Id="spartan.index.tmpl" Name="index.tmpl" />
<File Id="spartan.manifest.tmpl" Name="manifest.tmpl" />
<File Id="spartan.map" Name="map" />
<File Id="spartan.notfound.tmpl" Name="notfound.tmpl" />
<File Id="spartan.search.tmpl" Name="search.tmpl" />
<File Id="spartan.shortlog.tmpl" Name="shortlog.tmpl" />
<File Id="spartan.shortlogentry.tmpl" Name="shortlogentry.tmpl" />
<File Id="spartan.tags.tmpl" Name="tags.tmpl" />
</Component>
</Directory>
<Directory Id="templates.staticdir" Name="static">
Steve Borho
wix: add support for x64 native MSI packages
r13042 <Component Id="templates.static" Guid="$(var.templates.static.guid)" Win64='$(var.IsX64)'>
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="static.background.png" Name="background.png" KeyPath="yes" />
<File Id="static.coal.file.png" Name="coal-file.png" />
<File Id="static.coal.folder.png" Name="coal-folder.png" />
<File Id="static.excanvas.js" Name="excanvas.js" />
Steve Borho
wix: a new mercurial.js has replaced graph.js
r14078 <File Id="static.mercurial.js" Name="mercurial.js" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="static.hgicon.png" Name="hgicon.png" />
<File Id="static.hglogo.png" Name="hglogo.png" />
Steve Borho
wix: style-coal.css has been renamed
r26886 <File Id="static.style.coal.css" Name="style-extra-coal.css" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 <File Id="static.style.gitweb.css" Name="style-gitweb.css" />
<File Id="static.style.monoblue.css" Name="style-monoblue.css" />
<File Id="static.style.paper.css" Name="style-paper.css" />
<File Id="static.style.css" Name="style.css" />
Steve Borho
wix: pull in new templates
r20315 <File Id="static.feed.icon" Name="feed-icon-14x14.png" />
Adrian Buehlmann
wix: refactor and new guids.wxi
r10828 </Component>
</Directory>
</Directory>
</DirectoryRef>
</Fragment>
</Wix>