Mercurial > hg
view contrib/wix/locale.wxs @ 35779:eefabd9ed3e1
convert: use a collections.deque
This function was doing a list.pop(0) on a list whose length
was the number of revisions to convert. Popping an early element
from long lists is not an efficient operation.
collections.deque supports efficient inserts and pops at both
ends. So we switch to that data structure.
When converting the mozilla-unified repository, which has 445,748
revisions, this change makes the "sorting..." step of
`hg convert --sourcesort` significantly faster:
before: ~59.2s
after: ~1.3s
Differential Revision: https://phab.mercurial-scm.org/D1934
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 21 Jan 2018 17:11:31 -0800 |
parents | 14e8fef9158d |
children |
line wrap: on
line source
<?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?include defines.wxi ?> <?define hglocales = da;de;el;fr;it;ja;pt_BR;ro;ru;sv;zh_CN;zh_TW ?> <Fragment> <ComponentGroup Id="localeFolder"> <?foreach LOC in $(var.hglocales) ?> <ComponentRef Id="hg.locale.$(var.LOC)"/> <?endforeach?> </ComponentGroup> </Fragment> <Fragment> <DirectoryRef Id="INSTALLDIR"> <Directory Id="localedir" Name="locale" FileSource="$(var.SourceDir)"> <?foreach LOC in $(var.hglocales) ?> <Directory Id="hg.locale.$(var.LOC)" Name="$(var.LOC)"> <Directory Id="hg.locale.$(var.LOC).LC_MESSAGES" Name="LC_MESSAGES"> <Component Id="hg.locale.$(var.LOC)" Guid="*" Win64='$(var.IsX64)'> <File Id="hg.mo.$(var.LOC)" Name="hg.mo" KeyPath="yes" /> </Component> </Directory> </Directory> <?endforeach?> </Directory> </DirectoryRef> </Fragment> </Wix>