[webkit-help] What about WebKit makes DOM insertion slow when your template has whitespace / text nodes?
webkit at steveluscher.com
Wed May 8 09:48:03 PDT 2013
Hello WebKit team,
I've been able to replicate some strange behavior on Chrome 26 (Mac) and Safari 6.0.4 (Mac). Essentially, rendering an HTML template that has extra whitespace / text-nodes in it is incredibly slow.Rendering the same template with the whitespace stripped results in a 400x speedup.
Here's a detailed explanation of the bug:
And here's a JSFiddle demonstrating it:
Any idea what about WebKit causes this? Firefox 26, IE9, and Chrome Canary don't exhibit the bug.
More information about the webkit-help