Very slow performance in 1.3.1 when inserting large HTML fragment

Very slow performance in 1.3.1 when inserting large HTML fragment


Hi folks,
I have a large HTML fragment that I load via AJAX. The fragment is big
(~660KB),
and it takes over 2s (more like 2.7s) to insert it.
I've profiled the code, and it turns out that most of the time is
spent in the .trim()
function. It is being called from .clean() (around line 835):
                // Trim whitespace, otherwise indexOf won't work as expected
                var tags = jQuery.trim( elem ).toLowerCase();
Is this something that can be fixed?
Dimi.