CLOSED FIXED 9632
[Drosera] syntax highlighting is slow (reproducible 40 second hang)
https://bugs.webkit.org/show_bug.cgi?id=9632
Summary [Drosera] syntax highlighting is slow (reproducible 40 second hang)
Gavin Sherlock
Reported 2006-06-28 06:12:35 PDT
Launch Webkit (SVN 15070) Launch Drosera, and attach to Webkit In Webkit, go to http://nightly.webkit.org/ In Drosera, code from http://www.google-analytics.com/urchin.js will show up Use the drop down menu in Drosera to switch to looking at the source for http://nightly.webkit.org/ Drosera will now hang for ~40 seconds while rendering the source
Attachments
Proposed fix (2.74 KB, patch)
2006-08-02 10:50 PDT, Timothy Hatcher
darin: review+
Timothy Hatcher
Comment 1 2006-06-28 09:13:57 PDT
This is our syntax highlighting, soon to be done in the engine at top speed.
Timothy Hatcher
Comment 2 2006-08-02 10:41:53 PDT
I can't reproduce on the nightly page, but this is very bad on yahoo.com. I have a fix.
Timothy Hatcher
Comment 3 2006-08-02 10:50:02 PDT
Created attachment 9826 [details] 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:
Timothy Hatcher
Comment 4 2006-08-02 10:57:38 PDT
Note: syntax highlight is still slow, but not 40 seconds. It is down to around 2-8 seconds for Yahoo.com depending on the computer speed. Syntax highlighting should be done in the engine, for maximum speed. See bug 10217.
Darin Adler
Comment 5 2006-08-02 16:02:58 PDT
Comment on attachment 9826 [details] Proposed fix r=me
Timothy Hatcher
Comment 6 2006-08-02 16:12:01 PDT
Landed in r15762
Timothy Hatcher
Comment 7 2008-05-17 09:55:52 PDT
Closing since Drosera has been replaced by the new Web Inspector debugger. Moving to the New Bugs component so the Drosera component can be closed and removed.
Note You need to log in before you can comment on or make changes to this bug.