<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>9632</bug_id>
          
          <creation_ts>2006-06-28 06:12:35 -0700</creation_ts>
          <short_desc>[Drosera] syntax highlighting is slow (reproducible 40 second hang)</short_desc>
          <delta_ts>2008-05-17 09:55:52 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gavin Sherlock">gsherloc</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47445</commentid>
    <comment_count>0</comment_count>
    <who name="Gavin Sherlock">gsherloc</who>
    <bug_when>2006-06-28 06:12:35 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47660</commentid>
    <comment_count>1</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2006-06-28 09:13:57 -0700</bug_when>
    <thetext>This is our syntax highlighting, soon to be done in the engine at top speed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51454</commentid>
    <comment_count>2</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2006-08-02 10:41:53 -0700</bug_when>
    <thetext>I can&apos;t reproduce on the nightly page, but this is very bad on yahoo.com. I have a fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51456</commentid>
    <comment_count>3</comment_count>
      <attachid>9826</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2006-08-02 10:50:02 -0700</bug_when>
    <thetext>Created attachment 9826
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:</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51458</commentid>
    <comment_count>4</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2006-08-02 10:57:38 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51491</commentid>
    <comment_count>5</comment_count>
      <attachid>9826</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-08-02 16:02:58 -0700</bug_when>
    <thetext>Comment on attachment 9826
Proposed fix

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51497</commentid>
    <comment_count>6</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2006-08-02 16:12:01 -0700</bug_when>
    <thetext>Landed in r15762</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80738</commentid>
    <comment_count>7</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2008-05-17 09:55:52 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>9826</attachid>
            <date>2006-08-02 10:50:02 -0700</date>
            <delta_ts>2006-08-02 16:02:58 -0700</delta_ts>
            <desc>Proposed fix</desc>
            <filename>9632.patch</filename>
            <type>text/plain</type>
            <size>2801</size>
            <attacher name="Timothy Hatcher">timothy</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDE1NzUx
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMjMgQEAKKzIwMDYtMDgt
MDIgIFRpbW90aHkgSGF0Y2hlciAgPHRpbW90aHlAYXBwbGUuY29tPgorCisgICAgICAgIFJldmll
d2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIEJ1ZyA5NjMyOiBbRHJvc2VyYV0gc3lu
dGF4IGhpZ2hsaWdodGluZyBpcyBzbG93IChyZXByb2R1Y2libGUgNDAgc2Vjb25kIGhhbmcpCisg
ICAgICAgIGh0dHA6Ly9idWd6aWxsYS5vcGVuZGFyd2luLm9yZy9zaG93X2J1Zy5jZ2k/aWQ9OTYz
MgorCisgICAgICAgIERvIG5vdCBjaGFuZ2UgdGhlIGZpbGUgc291cmNlIHdoZW4gbm9ybWFsaXpp
bmcgdGhlIGxpbmUgZW5kaW5ncy4KKyAgICAgICAgV2UgdXNlIHRoaXMgZmlsZSBzb3VyY2UgdG8g
Y29tcGFyZSBhZ2FpbnN0IG5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FyIGxpbmVzID0g
c3ludGF4SGlnaGxpZ2h0KGZpbGUuc291cmNlKS5zcGxpdCgiXG4iKTsKKyAgICAgICAgdmFyIG5v
cm1hbGl6ZWRTb3VyY2UgPSBmaWxlLnNvdXJjZS5yZXBsYWNlKC9cclxufFxyLywgIlxuIik7IC8v
IG5vcm1hbGl6ZSBsaW5lIGVuZGluZ3MKKyAgICAgICAgdmFyIGxpbmVzID0gc3ludGF4SGlnaGxp
Z2h0KG5vcm1hbGl6ZWRTb3VyY2UpLnNwbGl0KCJcbiIpOwogICAgICAgICBmb3IoIHZhciBpID0g
MDsgaSA8IGxpbmVzLmxlbmd0aDsgaSsrICkgewogICAgICAgICAgICAgdmFyIHRyID0gc291cmNl
c0RvY3VtZW50LmNyZWF0ZUVsZW1lbnQoInRyIik7CiAgICAgICAgICAgICB2YXIgdGQgPSBzb3Vy
Y2VzRG9jdW1lbnQuY3JlYXRlRWxlbWVudCgidGQiKTsKQEAgLTc1Niw2ICs3NTUsNyBAQCBmdW5j
dGlvbiBkaWRQYXJzZVNjcmlwdChzb3VyY2UsIGZpbGVTb3VyCiAgICAgdmFyIGZpbGVJbmRleCA9
IGZpbGVzTG9va3VwW3VybF07CiAgICAgdmFyIGZpbGUgPSBmaWxlc1tmaWxlSW5kZXhdOwogICAg
IHZhciBmaXJzdExvYWQgPSBmYWxzZTsKKwogICAgIGlmICghZmlsZUluZGV4IHx8ICFmaWxlKSB7
CiAgICAgICAgIGZpbGVJbmRleCA9IGZpbGVzLmxlbmd0aCArIDE7CiAgICAgICAgIGlmICh1cmwu
bGVuZ3RoKQo=
</data>
<flag name="review"
          id="3025"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>