Keep _NoPredNodes in a heap rather than a sorted array.
Problem discovered by: Brian Harring <ferringb@tigris.org>
From Brian (edited):
> The original implementation had several nasty cases; essentially,
> for adding a single node in, every time it required a full sort of
> the nodes list. At least for gentoo-x86 cvs repo, several times we
> saw that list well past 20k items- the problem here is that 19,999
> of those items are already sorted yet each sort invocation requires
> checking each one to ensure ordering is sorted.
So maintain the no-pred nodes in a heap instead of a list to make
insertion and deletion O(lg N) operations. The objects stored in the
heap are tuples which are constructed so as to sort in the right way.
git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5100 be7e6eca-30d4-0310-a8e5-ac0d63af7087