<?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>75050</bug_id>
          
          <creation_ts>2011-12-21 15:50:09 -0800</creation_ts>
          <short_desc>REGRESSION(r103349): 7.5% peak memory use increase on Windows</short_desc>
          <delta_ts>2012-01-03 05:21:01 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tony Chang">tony</reporter>
          <assigned_to name="Mike Reed">reed</assigned_to>
          <cc>caryclark</cc>
    
    <cc>enne</cc>
    
    <cc>epoger</cc>
    
    <cc>gbillock</cc>
    
    <cc>ggaren</cc>
    
    <cc>loislo</cc>
    
    <cc>reed</cc>
    
    <cc>rniwa</cc>
    
    <cc>sail</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>525751</commentid>
    <comment_count>0</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2011-12-21 15:50:09 -0800</bug_when>
    <thetext>http://build.chromium.org/f/chromium/perf/vista-release-webkit-latest/moz/report.html?history=150&amp;rev=115372&amp;graph=vm_peak_r

Looks like the regression range is http://trac.webkit.org/log/trunk/Source?rev=103365&amp;stop_rev=103354&amp;verbose=on .

None of the changes seems to obviously be the cause.

I&apos;m OOO right now, but thought I should file a bug so someone can take a look.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>525855</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-12-21 17:13:49 -0800</bug_when>
    <thetext>Suspicious revisions:

Merge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac
http://trac.webkit.org/changeset/103354

Tightened up Vector&lt;T&gt;::append
http://trac.webkit.org/changeset/103356

[Coverity] Fix leak in V8HTMLDocument
http://trac.webkit.org/changeset/103358

Change adoptPtr(new ...) to ...::create in Page.cpp
http://trac.webkit.org/changeset/103365</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>525871</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-12-21 17:25:39 -0800</bug_when>
    <thetext>Looking at Chromium changes, WebKit roll r115310 (Chromium revision) definitely regressed the memory usage on Windows bot:
http://build.chromium.org/f/chromium/perf/vista-release-dual-core/moz/report.html?history=150&amp;rev=-1&amp;graph=vm_peak_r

http://build.chromium.org/f/chromium/perf/dashboard/ui/changelog.html?url=/trunk/src&amp;range=115306:115310</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>525872</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-12-21 17:26:06 -0800</bug_when>
    <thetext>All regressions are P1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>525891</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-12-21 17:50:04 -0800</bug_when>
    <thetext>Apparently http://trac.webkit.org/changeset/103354 is specific to Mac so we can cross that out.

It seems very unlikely that either http://trac.webkit.org/changeset/103358 or http://trac.webkit.org/changeset/103365 can cause Windows-specific memory regression.

Given that I think http://trac.webkit.org/changeset/103356/trunk/Source/JavaScriptCore/wtf/Vector.h is the culprit. I don&apos;t see why it can cause memory use increase unless the compiler is generating bad code but then I wouldn&apos;t be surprised if that were the case since the comment being removed says it used to cause a compilation error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>526196</commentid>
    <comment_count>5</comment_count>
    <who name="Ilya Tikhonovsky">loislo</who>
    <bug_when>2011-12-22 05:08:22 -0800</bug_when>
    <thetext>I confirm that the problem is in webkit.
I&apos;m bisecting it. Looks like it is somewhere between 103344 and 103355

The suspicious revision is 103353

sizeof(RenderStyle) is 64 instead of 56 on Windows (x86)
 https://bugs.webkit.org/show_bug.cgi?id=74876
Reviewed by Ryosuke Niwa.
Move bit fields into a new class and use unsigned for all types so we
align at 4 byte bounds. Also move the initializers into the header
file (has the side benefit of not needing to duplicate the initializers
in 3 places).
Enable the compile assert on Windows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>526228</commentid>
    <comment_count>6</comment_count>
    <who name="Ilya Tikhonovsky">loislo</who>
    <bug_when>2011-12-22 06:51:32 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; I confirm that the problem is in webkit.
&gt; I&apos;m bisecting it. Looks like it is somewhere between 103344 and 103355
&gt; 
&gt; The suspicious revision is 103353
&gt; 
&gt; sizeof(RenderStyle) is 64 instead of 56 on Windows (x86)
&gt;  https://bugs.webkit.org/show_bug.cgi?id=74876
&gt; Reviewed by Ryosuke Niwa.
&gt; Move bit fields into a new class and use unsigned for all types so we
&gt; align at 4 byte bounds. Also move the initializers into the header
&gt; file (has the side benefit of not needing to duplicate the initializers
&gt; in 3 places).
&gt; Enable the compile assert on Windows.

Actually it is 103349. 
enable USE_SKIA_TEXT by default, replacing GDI for all text drawing

Revert it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>526241</commentid>
    <comment_count>7</comment_count>
    <who name="Mike Reed">reed</who>
    <bug_when>2011-12-22 07:19:52 -0800</bug_when>
    <thetext>I expect this is related to the large font-cache setting we have (in skia/skia.gyp). This gives us a big perf win on page-cyclers (faster than GDI) but will take more ram (which can be purged).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>526242</commentid>
    <comment_count>8</comment_count>
    <who name="Mike Reed">reed</who>
    <bug_when>2011-12-22 07:21:22 -0800</bug_when>
    <thetext>The max cache size can be reduce (either in the gyp, or via a runtime API), or we can live with a larger peak, since that is the tradeoff for faster performance. I can go either way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>526265</commentid>
    <comment_count>9</comment_count>
    <who name="">epoger</who>
    <bug_when>2011-12-22 08:22:11 -0800</bug_when>
    <thetext>Here are more graphs, showing the simultaneous performance improvement and peak-memory-consumption regression as of Chromium r115310 (Webkit DEPS roll):

http://build.chromium.org/f/chromium/perf/vista-release-dual-core/intl1/report.html?history=150&amp;rev=115500&amp;graph=times
http://build.chromium.org/f/chromium/perf/vista-release-dual-core/intl1/report.html?history=150&amp;rev=115500&amp;graph=vm_peak_r</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>526270</commentid>
    <comment_count>10</comment_count>
    <who name="">epoger</who>
    <bug_when>2011-12-22 08:35:00 -0800</bug_when>
    <thetext>Are there any bots that went red as a result of this peak-memory-consumption regression?  I don&apos;t see any on the Chromium side...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>526274</commentid>
    <comment_count>11</comment_count>
    <who name="Mike Reed">reed</who>
    <bug_when>2011-12-22 08:40:45 -0800</bug_when>
    <thetext>We will locally reproduce these page cyclers, and play with the font-cache size to mitigate the ram usage -vs- performance, but for the moment I recommend the code stays as is.
- faster text drawing needs ram unfortunately
- we will continue to improve our balance-point for ram-vs-speed as we gather in-the-field numbers of real font usage (not just for these cyclers)
- we will also implement font-cache-shrinking for tabs that go into the background</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>527404</commentid>
    <comment_count>12</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2011-12-27 10:25:05 -0800</bug_when>
    <thetext>Since this is an intentional trade off, seems like we can close this bug if we file bugs for the two follow up action items mentioned in comment #11.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>528735</commentid>
    <comment_count>13</comment_count>
    <who name="Mike Reed">reed</who>
    <bug_when>2012-01-03 05:21:01 -0800</bug_when>
    <thetext>http://code.google.com/p/chromium/issues/detail?id=108979
http://code.google.com/p/chromium/issues/detail?id=108980

Closing, to track the follow-on initiatives via the above bugs.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>