Mercurial > hg
view tests/test-docker-packaging.t @ 50942:75d3306fbc9a stable
tags: avoid expensive access to repo.changelog in a loop
repo.changelog needs some cache invalidation when run on filtered repository.
Accessing it in that loop can be expensive when there is many heads (e.g.
mozilla try and it 25 000 heads).
Note that the loop itself seems useless, but after this patch it no longer take
about ⅛ of the time we spend computing cache for mozilla try.
before :
! wall 0.350994 comb 0.350000 user 0.330000 sys 0.020000 (median of 28)
after :
! wall 0.319520 comb 0.310000 user 0.290000 sys 0.020000 (median of 30)
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 21 Jun 2023 21:57:44 +0200 |
parents | 7e5be4a7cda7 |
children |
line wrap: on
line source
#require test-repo slow docker $ . "$TESTDIR/helpers-testrepo.sh" $ testrepohgenv Ensure debuild doesn't run the testsuite, as that could get silly. $ DEB_BUILD_OPTIONS=nocheck $ export DEB_BUILD_OPTIONS $ OUTPUTDIR=`pwd` $ export OUTPUTDIR $ cd "$TESTDIR"/.. $ make docker-debian-buster > $OUTPUTDIR/build.log 2>&1 $ cd $OUTPUTDIR $ ls *.deb mercurial-common_*.deb (glob) mercurial_*.deb (glob) We check debian package contents with portable tools so that when we're on non-debian machines we can still test the packages that are built using docker. main deb should have .so but no .py $ ar x mercurial_*.deb $ tar tf data.tar* | grep -E '(localrepo|parsers)' ./usr/lib/python2.7/dist-packages/mercurial/parsers*.so (glob) mercurial-common should have .py but no .so or .pyc $ ar x mercurial-common_*.deb $ tar tf data.tar* | grep -E '(localrepo|parsers)' ./usr/lib/python2.7/dist-packages/mercurial/pure/parsers.py ./usr/lib/python2.7/dist-packages/mercurial/localrepo.py