[webkit-reviews] review requested: [Bug 9632] [Drosera] syntax highlighting is slow (reproducible 40 second hang) : [Attachment 9826] Proposed fix

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Wed Aug 2 10:50:03 PDT 2006


Timothy Hatcher <timothy at hatcher.name> has asked  for review:
Bug 9632: [Drosera] syntax highlighting is slow (reproducible 40 second hang)
http://bugzilla.opendarwin.org/show_bug.cgi?id=9632

Attachment 9826: Proposed fix
http://bugzilla.opendarwin.org/attachment.cgi?id=9826&action=edit

------- Additional Comments from Timothy Hatcher <timothy at hatcher.name>
Do not change the file source when normalizing the line endings. We use this
file source to compare against new versions of the source as it comes in, so we
can skip re-syntax highlighting if they are the same. The problem apparent on
yahoo.com since they have mixed line endings and once we normalize them the
source will always be different. This was compounded by the fact that yahoo has
around 40 inline scripts. Each inline script causes us to check if the main
document has more loaded, that is when we compare the source strings. Since
they are always different we would syntax highlight yahoo.com 40 times! We do
check source length before doing a more expensive string comparison, but the
lengths were the same.

* Drosera/debugger.js:



More information about the webkit-reviews mailing list