<?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>24889</bug_id>
          
          <creation_ts>2009-03-27 09:48:06 -0700</creation_ts>
          <short_desc>Shortening a &lt;select&gt;&apos;s length is n^2</short_desc>
          <delta_ts>2009-03-27 09:58:03 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>24876</dup_id>
          
          <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="Peter Kasting">pkasting</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>hyatt</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>115560</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-03-27 09:48:06 -0700</bug_when>
    <thetext>LayoutTests/fast/forms/select-max-length.html sets the length of a 10,000 item select to 0.

This takes a ridiculously long time.  Looking in HTMLSelectElement::setLength(), when we shorten a select to length n, we do it by repeatedly removing the element at position n, which moves the whole rest of the list up to fill in the hole.

I&apos;m not sure what the required semantics of this operation are, but removing all these elements at once, or at least removing them from length() down to n, would both be much better.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115561</commentid>
    <comment_count>1</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2009-03-27 09:52:06 -0700</bug_when>
    <thetext>CCing hyatt because he&apos;ll know the right people to care about perf here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115562</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2009-03-27 09:58:03 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 24876 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>