Status: New
Owner: [email protected]
Labels: Type-Defect Priority-Medium
New issue 1358 by [email protected]: html_sanitize is slow for large inputs
on firefox 3.6
http://code.google.com/p/google-caja/issues/detail?id=1358
firefox4, safari5, chrome12, opera11 are all fine.
firefox 3.6 is slow.
it's not the regexp matching that's slow. basically, doing
s = s.substr(k);
thousands of times in a loop takes noticeable time.
chopping off the tail in a loop is fast, probably shares a data pointer
with a different length. chopping off the head in a loop is slow, probably
copies the tail to a new allocation.
for firefox3, the regexp //y flag and lastIndex is probably a viable
solution.
need to test IE.
Attachments:
slow.html 364 bytes