nhibernate/nhibernate-core — pull request #257 by paulwh (2014-02-28 23:48:27+00:00)
Title: Fixed performance issues with SortInsertActions for large batches.

The way this function was written, a huge number of senseless iterations and comparisons were performed before simply being negated by the && j > lastPos check. By making the loop over the nameList the outermost loop and start at lastPos + 1, CPU usage on large insert batches is significantly reduced and there should be no functional change.