Tue, 11 Aug 2015 15:06:02 -0400 changelog: trust C implementation of reachableroots more
Augie Fackler <augie@google.com> [Tue, 11 Aug 2015 15:06:02 -0400] rev 26011
changelog: trust C implementation of reachableroots more There are no remaining codepaths in reachableroots where it will return None, so just trust it completely and simplify this method. Result by revset ================ Revision: 0) Revision 1c75249e159b: style: adjust whitespaces in webutil.py 1) Revision d1d91b8090c6: changelog: trust C implementation of reachableroots more revset #0: 0::tip plain 0) 0.067684 1) 0.006622 9% revset #1: 0::@ plain 0) 0.068249 1) 0.009394 13% IOW this is a 10x speedup in my repo for hg itself for 0::tip and similar revsets now that the C code is correctly wired up.
Tue, 11 Aug 2015 14:53:47 -0400 reachableroots: return NULL if we're throwing an exception
Augie Fackler <augie@google.com> [Tue, 11 Aug 2015 14:53:47 -0400] rev 26010
reachableroots: return NULL if we're throwing an exception Based on my reading of [0] and surrounding sections, if we want an exception to be properly raised when something goes wrong in the C code, we need to make sure we return NULL here. Do so. https://docs.python.org/2/extending/extending.html#back-to-the-example
Tue, 11 Aug 2015 15:34:10 -0400 reachableroots: fix transposition of set and list types in PyArg_ParseTuple
Augie Fackler <augie@google.com> [Tue, 11 Aug 2015 15:34:10 -0400] rev 26009
reachableroots: fix transposition of set and list types in PyArg_ParseTuple This is being masked by the function not properly returning NULL when it raises an exception, so the client code was just falling back to the native codepath when it got None back. A future change removes all reason for this C function to return None, which exposed this problem during development.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 +10000 tip