Mercurial > hg
annotate 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 |
rev | line source |
---|---|
10153 | 1 header = '<?xml version="1.0"?>\n<log>\n' |
2 footer = '</log>\n' | |
3 | |
13387
0be2fe6a0843
templates: add bookmarks to command line styles
David Soria Parra <dsp@php.net>
parents:
10159
diff
changeset
|
4 changeset = '<logentry revision="{rev}" node="{node}">\n{branches}{bookmarks}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n</logentry>\n' |
0be2fe6a0843
templates: add bookmarks to command line styles
David Soria Parra <dsp@php.net>
parents:
10159
diff
changeset
|
5 changeset_verbose = '<logentry revision="{rev}" node="{node}">\n{branches}{bookmarks}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n<paths>\n{file_adds}{file_dels}{file_mods}</paths>\n{file_copies}</logentry>\n' |
0be2fe6a0843
templates: add bookmarks to command line styles
David Soria Parra <dsp@php.net>
parents:
10159
diff
changeset
|
6 changeset_debug = '<logentry revision="{rev}" node="{node}">\n{branches}{bookmarks}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n<paths>\n{file_adds}{file_dels}{file_mods}</paths>\n{file_copies}{extras}</logentry>\n' |
10153 | 7 |
8 file_add = '<path action="A">{file_add|xmlescape}</path>\n' | |
9 file_mod = '<path action="M">{file_mod|xmlescape}</path>\n' | |
10 file_del = '<path action="R">{file_del|xmlescape}</path>\n' | |
11 | |
12 start_file_copies = '<copies>\n' | |
13 file_copy = '<copy source="{source|xmlescape}">{name|xmlescape}</copy>\n' | |
14 end_file_copies = '</copies>\n' | |
15 | |
16 parent = '<parent revision="{rev}" node="{node}" />\n' | |
17 branch = '<branch>{branch|xmlescape}</branch>\n' | |
18 tag = '<tag>{tag|xmlescape}</tag>\n' | |
13387
0be2fe6a0843
templates: add bookmarks to command line styles
David Soria Parra <dsp@php.net>
parents:
10159
diff
changeset
|
19 bookmark = '<bookmark>{bookmark|xmlescape}</bookmark>\n' |
10159
182416227722
Added output of "extras" to hg log XML output
Robert Bachmann <rbachm@gmail.com>
parents:
10153
diff
changeset
|
20 extra = '<extra key="{key|xmlescape}">{value|xmlescape}</extra>\n' |