<?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>107608</bug_id>
          
          <creation_ts>2013-01-22 18:00:29 -0800</creation_ts>
          <short_desc>Web Inspector: Opening script panel and opening the CMD+O script open panel is slow for large numbers of files</short_desc>
          <delta_ts>2013-02-04 08:55:41 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector (Deprecated)</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>107122</dup_id>
          
          <bug_file_loc>http://jsbin.com/eluqam/1</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="Malte Ubl">malte</reporter>
          <assigned_to name="Mike West">mkwst</assigned_to>
          <cc>apavlov</cc>
    
    <cc>keishi</cc>
    
    <cc>loislo</cc>
    
    <cc>mkwst</cc>
    
    <cc>paulirish</cc>
    
    <cc>pfeldman</cc>
    
    <cc>pmuellr</cc>
    
    <cc>vsevik</cc>
    
    <cc>web-inspector-bugs</cc>
    
    <cc>yurys</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>813632</commentid>
    <comment_count>0</comment_count>
    <who name="Malte Ubl">malte</who>
    <bug_when>2013-01-22 18:00:29 -0800</bug_when>
    <thetext>We use //@ sourceURL annotations to load large numbers of JS files via a single HTTP requests during development. If the number of files gets large, opening the script panel and opening files using the file picker dialog becomes relatively slow (3 seconds on my machine).

Example
for (var i = 0; i &lt; 2000; i++) {
   eval(&apos;function i&apos; + i + 
       &apos;() { console.log(&apos; + i + &apos;) }\n//@ sourceURL=jsfile://foo.com/&apos; + 
       i + &apos;.js&apos;)  
}
http://jsbin.com/eluqam/1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817178</commentid>
    <comment_count>1</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2013-01-26 05:33:07 -0800</bug_when>
    <thetext>Profiling this shows that a huge chunk of time is taken up repeatedly doing a binary search over the tree (in TreeOutline.prototype.appendChild) to determine where to insert new children. Dropping sorting entirely speeds things up quite a bit. Not perfect, but significantly better.

I&apos;ll fiddle with sorting outside the tree view to see what impact that has.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817547</commentid>
    <comment_count>2</comment_count>
    <who name="Vsevolod Vlasov">vsevik</who>
    <bug_when>2013-01-27 23:35:44 -0800</bug_when>
    <thetext>We have fixed this recently in https://bugs.webkit.org/show_bug.cgi?id=107122.
This was happening because we were using localeCompare which is apparently much more (Naive performance measuring showed 2000x difference) slower than string comparison.

You can try using latest builds, e.g. Chrome Canary to check if this works for you now.

*** This bug has been marked as a duplicate of bug 107122 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>820753</commentid>
    <comment_count>3</comment_count>
    <who name="Malte Ubl">malte</who>
    <bug_when>2013-01-30 16:09:41 -0800</bug_when>
    <thetext>Nice, with our work load it still isn&apos;t speedy but much better!

Thank You!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>824409</commentid>
    <comment_count>4</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2013-02-04 08:55:41 -0800</bug_when>
    <thetext>@malte: it uses viewport now, should be really fast.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>