The problem: for 1.4.4 there was a
commit that ditched sourceIndex when sorting nodes. This turns out to be
disastrous for IE performance (as in 2% of previous speed) as demonstrated in
this jsperf test. It was done for the following stated reason:
Both the createRange and sourceIndex code branches failed on disconnected DOM nodes, nodes in separate DOM documents, and nodes in non-HTML documents.
However no unit tests were added for these conditions and in
testing disconnected DOM nodes I found that there is still no "solution" to sorting disconnected DOM nodes. Even after this change, every browser not only sorts differently from each other, but will in fact sort the nodes differently even upon refresh within the same browser. So obviously we can throw out disconnected DOM nodes as a justification for this performance hit.
That leaves separate DOM documents and non-HTML documents. I'm not even sure how to begin testing that! What I'd like to see, ideally is unit test cases for these scenarios that will break in 1.4.3. Using those tests we could at least refine a plugin to address this
massive performance degradation with the hope that our beloved sourceIndex could someday return to the core as a prodigal son!