[Webkit-unassigned] [Bug 9632] [Drosera] syntax highlighting is slow (reproducible 40 second hang)

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


http://bugzilla.opendarwin.org/show_bug.cgi?id=9632


timothy at hatcher.name changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #9826|                            |review?
               Flag|                            |




------- Comment #3 from timothy at hatcher.name  2006-08-02 10:50 PDT -------
Created an attachment (id=9826)
 --> (http://bugzilla.opendarwin.org/attachment.cgi?id=9826&action=view)
Proposed fix

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:


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list