<?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>13595</bug_id>
          
          <creation_ts>2007-05-05 09:58:46 -0700</creation_ts>
          <short_desc>Repeatedly accessing XHR.responseText on a large file (70MB) causes memory usage to balloon</short_desc>
          <delta_ts>2007-07-25 23:41:30 -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>XML</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Antoine Quint">ml</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>mjs</cc>
    
    <cc>mrowe</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>10893</commentid>
    <comment_count>0</comment_count>
    <who name="Antoine Quint">ml</who>
    <bug_when>2007-05-05 09:58:46 -0700</bug_when>
    <thetext>Loading a large video file using XMLHttpRequest make the nightly WebKit application memory shoot up to about 800MB in 5 seconds, and keeps going up until no memory is left.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10895</commentid>
    <comment_count>1</comment_count>
      <attachid>14359</attachid>
    <who name="Antoine Quint">ml</who>
    <bug_when>2007-05-05 09:59:58 -0700</bug_when>
    <thetext>Created attachment 14359
Testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10896</commentid>
    <comment_count>2</comment_count>
      <attachid>14359</attachid>
    <who name="Antoine Quint">ml</who>
    <bug_when>2007-05-05 10:03:39 -0700</bug_when>
    <thetext>Comment on attachment 14359
Testcase

This testcase needs to be opened from the local filesystem given that it makes a call to another domain and would result in a JS exception if opened directly from the link within the bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10932</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-05-06 00:03:08 -0700</bug_when>
    <thetext>It doesn&apos;t look like there&apos;s a leak here, but garbage collection doesn&apos;t free memory quickly enough.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4714</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-14 16:32:21 -0700</bug_when>
    <thetext>&lt;rdar://problem/5335880&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4591</commentid>
    <comment_count>5</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2007-07-16 15:49:51 -0700</bug_when>
    <thetext>In particular, it looks like the problem is caused by this line
               var currentLength = xhr.responseText.length;
which causes the network data to be serialized to text every time a new chunk arrives.

Is there a real website that uses this technique?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3703</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-25 21:01:11 -0700</bug_when>
    <thetext>Fixed by Maciej in r24633  (as &lt;rdar://problem/5300291&gt;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3692</commentid>
    <comment_count>7</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-25 23:41:30 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Fixed by Maciej in r24633  (as &lt;rdar://problem/5300291&gt;).

Follow-up fix in r24637.

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>14359</attachid>
            <date>2007-05-05 09:59:58 -0700</date>
            <delta_ts>2007-05-05 09:59:58 -0700</delta_ts>
            <desc>Testcase</desc>
            <filename>massive_leak.xml</filename>
            <type>application/xhtml+xml</type>
            <size>1160</size>
            <attacher name="Antoine Quint">ml</attacher>
            
              <data encoding="base64">PGh0bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiPgogIAogIDxoZWFkPgog
ICAgPHRpdGxlPk1hc3NpdmUgTWVtb3J5IExlYWs8L3RpdGxlPgogICAgPHNjcmlwdD4KICAgICAg
PCFbQ0RBVEFbCgogICAgICAgIGZ1bmN0aW9uIGxvYWRWaWRlbyAodmlkZW9VUkkpIHsKICAgICAg
ICAgIHZhciB4aHIgPSBuZXcgWE1MSHR0cFJlcXVlc3QoKTsKICAgICAgICAgIHhoci5vcGVuKCdH
RVQnLCB2aWRlb1VSSSwgdHJ1ZSk7CiAgICAgICAgICB4aHIub25yZWFkeXN0YXRlY2hhbmdlID0g
ZnVuY3Rpb24gKHhockV2ZW50KSB7CiAgICAgICAgICAgIGlmICh4aHIucmVhZHlTdGF0ZSA9PSAz
KSB7CiAgICAgICAgICAgICAgdmFyIGN1cnJlbnRMZW5ndGggPSB4aHIucmVzcG9uc2VUZXh0Lmxl
bmd0aDsKICAgICAgICAgICAgICB2YXIgdG90YWxMZW5ndGggPSBwYXJzZUludCh4aHIuZ2V0UmVz
cG9uc2VIZWFkZXIoJ0NvbnRlbnQtTGVuZ3RoJyksIDEwKTsKICAgICAgICAgICAgICBwcmludCgo
TWF0aC5yb3VuZCgoY3VycmVudExlbmd0aCAvIHRvdGFsTGVuZ3RoKSAqIDEwMDAwKSAvIDEwMCkg
KyAnJScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKHhoci5yZWFkeVN0YXRl
ID09IDQpIHsKICAgICAgICAgICAgICBpZiAoeGhyLnN0YXR1cyA9PSAyMDApIHsKICAgICAgICAg
ICAgICAgIGFsZXJ0KCdkb25lIGxvYWRpbmcnKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAg
ICAgZWxzZSB7CiAgICAgICAgICAgICAgICBhbGVydCgnTk9LJyk7CiAgICAgICAgICAgICAgfQog
ICAgICAgICAgICB9CiAgICAgICAgICB9OwogICAgICAgICAgeGhyLnNlbmQobnVsbCk7CiAgICAg
ICAgfQoKICAgICAgICBmdW5jdGlvbiBwcmludCAobWVzc2FnZSkgewogICAgICAgICAgZG9jdW1l
bnQuZ2V0RWxlbWVudEJ5SWQoJ291dGxldCcpLnRleHRDb250ZW50ID0gbWVzc2FnZTsKICAgICAg
ICB9CgogICAgICAgIGxvYWRWaWRlbygnaHR0cDovL3N0cmVhbW9zLmF0bHJlYy5jb20vZG93bmxv
YWQvYXRsYW50aWMvYmpvcmsvdmlkZW8vYmpvcmtfaXR1bmVzMS5tNHYnKTsKCiAgICAgIF1dPgog
ICAgPC9zY3JpcHQ+CiAgPC9oZWFkPgogIAogIDxib2R5PgogICAgPHAgaWQ9Im91dGxldCIgLz4K
ICA8L2JvZHk+CiAgCjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>