Mercurial > hg
comparison mercurial/templates/map-cmdline.xml @ 23497:5817f71c2336
obsstore: disable garbage collection during initialization (issue4456)
Python garbage collection is triggered by container creation. So code that
creates a lot of tuples tends to trigger GC a lot. We disable the gc during
obsolescence marker parsing and associated initialization. This provides an
interesting speedup (25%).
Load marker function on my 58758 markers repo:
before: 0.468247 seconds
after: 0.344362 seconds
The benefit is a bit less visible overall. With python2.6 on my system I see:
after: 0.60
before: 0.53
The difference is probably explained by the delaying of a costly GC. (but there
is still a win). Marking involved tuples, lists and dicts as ignorable by the
garbage collector should give us more benefit. But this is another adventure.
Thanks goes to Siddharth Agarwal for the lead.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 26 Nov 2014 16:58:31 -0800 |
parents | 0be2fe6a0843 |
children | 3095b1027661 |
comparison
equal
deleted
inserted
replaced
23496:ee5a4ed4c8b1 | 23497:5817f71c2336 |
---|