Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 12:09:31 -0800] rev 31479
parsers: use Python memory allocator for indexObject->offsets
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 12:02:59 -0800] rev 31478
parsers: use Python memory allocator in commonancestorsheads()
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 11:56:47 -0800] rev 31477
osutil: use Python memory allocator in _listdir
The Python memory allocator has performance advantages
for small allocations.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 11:54:25 -0800] rev 31476
bdiff: use Python memory allocator in fixws
Python has its own memory allocation APIs. For allocations
<= 512 bytes, it allocates memory from arenas. This means that
average small allocations don't call the system allocator, which
makes them faster. Also, arena allocations cut down on memory
fragmentation, which can matter for performance in long-running
processes.
Another advantage of using the Python memory allocator is that
allocations are tracked by Python. This is a bigger deal in
Python 3, as modern versions of Python have some decent built-in
tools for examining memory usage, leaks, etc.
This patch converts a trivial malloc() + free() in the bdiff code
to use the Python allocator APIs. Since the object being
operated on is a line, chances are it will use an arena. So,
this could have a net positive impact on performance (although
I didn't measure it).
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 16 Mar 2017 11:17:55 -0700] rev 31475
localrepo: fix deprecation warning version of wfile
The patch lingered a bit too long in my local clone and I messed up when I
updated the version number. Since nobody caught it, I'm fixing the version after
the fact.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 15 Mar 2017 15:07:14 -0700] rev 31474
util: explicitly tests for None
Changeset 8b6927eb7efd removed the mutable default value, but did not explicitly
tested for None. Such implicit checking can introduce semantic and performance
issue. We move to an explicit check for None as recommended by PEP8:
https://www.python.org/dev/peps/pep-0008/#programming-recommendations