<?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>40111</bug_id>
          
          <creation_ts>2010-06-03 04:14:24 -0700</creation_ts>
          <short_desc>[Qt] Startup memory consumption is almost doubled when comparing qtwebkit-2.0 against QtWebKit in Qt 4.6</short_desc>
          <delta_ts>2010-07-01 00:29:26 -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>528+ (Nightly build)</version>
          <rep_platform>S60 Hardware</rep_platform>
          <op_sys>S60 3rd edition</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>41278</dependson>
          <blocked>35784</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter>nokiabugz</reporter>
          <assigned_to name="QtWebKit Unassigned">webkit-qt-unassigned</assigned_to>
          <cc>alexandra.1.santos</cc>
    
    <cc>benjamin</cc>
    
    <cc>ext-ananth.jasty</cc>
    
    <cc>hao.1.lu</cc>
    
    <cc>hausmann</cc>
    
    <cc>jesus</cc>
    
    <cc>jukka.jokiniva</cc>
    
    <cc>kenneth</cc>
    
    <cc>kling</cc>
    
    <cc>koshuin</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>zoltan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>233694</commentid>
    <comment_count>0</comment_count>
    <who name="">nokiabugz</who>
    <bug_when>2010-06-03 04:14:24 -0700</bug_when>
    <thetext>Our latest daily BAT r34916 shows that the startup memory is 12.28MB. But r34916+webkit 2.0 consumes 21.46MB!!! More than 9MB consumed. This will impact the stability of the browser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234378</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-06-04 14:27:34 -0700</bug_when>
    <thetext>So this is the difference between WebKit that comes with Qt 4.6 and QtWebKit 2.0?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>235355</commentid>
    <comment_count>2</comment_count>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2010-06-08 10:53:57 -0700</bug_when>
    <thetext>I think we need answer to Simon&apos;s question here to proceed. How are these r numbers related to QtWebKit releases ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>235377</commentid>
    <comment_count>3</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2010-06-08 11:10:35 -0700</bug_when>
    <thetext>Apparently they are related to the non-Qt based Nokia WebKit browser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>235740</commentid>
    <comment_count>4</comment_count>
    <who name="">nokiabugz</who>
    <bug_when>2010-06-09 04:32:09 -0700</bug_when>
    <thetext>Yes, Simon&apos;s assumption is correct: the doubling of memory is the difference we see when we replace Qt 4.6&apos;s WebKit with QtWebKit 2.0.  This type of memory consumption has been observed on two different Browser versions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>239244</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-06-16 23:12:17 -0700</bug_when>
    <thetext>*** Bug 40070 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>239245</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-06-16 23:14:25 -0700</bug_when>
    <thetext>Andreas and Benjamin have done some changes in Qt to reduce the memory usage and there&apos;s more in the pipeline. I hope to have a Qt 4.6 sis file next week that we can use for re-testing this situation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>239699</commentid>
    <comment_count>7</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2010-06-17 19:03:23 -0700</bug_when>
    <thetext>What are you comparing with? QGraphicsWebView? qtwebkit2.0 with tiling? It would be nice to know the setup or see the test application.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>239828</commentid>
    <comment_count>8</comment_count>
    <who name="Jukka Jokiniva">jukka.jokiniva</who>
    <bug_when>2010-06-18 02:29:03 -0700</bug_when>
    <thetext>I think this can tested with following steps.
Precondition: Symbian Phone with RD software and Qt4.6.3 installed
1. start &quot;MemMon&quot; tool from &quot;RD Tools&quot; menu, check the available free memory and leave it running on the background
2. Start the QtTestBrowser and load a test page. Switch back to &quot;MemMon&quot; and check the free memory. Do the math how much more memory is being used.
3. Quit the Browser
4. Update to QtWebKit 2.0. Switch to &quot;MemMon&quot; &amp; check the free memory.
5. Start the QtTestBrowser and load the same test page. Switch back to &quot;MemMon&quot; and check the free memory. Do the math.
This is quite rough method but should reveal if the memory consumption is double.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>242355</commentid>
    <comment_count>9</comment_count>
    <who name="Janne Koskinen">koshuin</who>
    <bug_when>2010-06-24 00:26:55 -0700</bug_when>
    <thetext>Checklist to go through in this order:

-bytepair vs. deflate. are the new binaries you are testing bytepair compressed?
This would double the memory consumption easily if whole DLL has to be loaded instead of just needed pages. This would instantly add that 10MB.

-The new block allocator
We create new heap with large reserve. This is intentional behaviour and not to be considered a bug. Should not show as system wide memory consumption though but seen funnier things happening :)

-did the compilation end up as debug instead of release binary?
I know sounds weird but I&apos;ve noticed a bug that we end up adding debugging info even when doing release builds.
Doesn&apos;t add up to ~10MB.

- and finally.. something actually caused regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>242687</commentid>
    <comment_count>10</comment_count>
    <who name="ananth jasty">ext-ananth.jasty</who>
    <bug_when>2010-06-24 15:19:30 -0700</bug_when>
    <thetext>The extraordinary amount of memory allocated makes me wonder if some of this is pre-reserved pages as per the new javascript and webcore heap allocators.

Assuming this is before any pages are opened, do we know if this memory is reserved or allocated?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>244163</commentid>
    <comment_count>11</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-06-29 02:09:53 -0700</bug_when>
    <thetext>Ok, here are some measurements:

Device: N8

Application: QtTestBrowser using a plain QWebView

Qt 4.6 - 0b618c7739c904ff35572886dbded9113a517dc0

Website: news.google.com

Free ram: ~134 MB

Free ram with QtWebKit from Qt 4.6: ~120MB

Free ram with QtWebkit 2.0 (38d650efc92427cd6452f6685d3c40d22428cdb7) : ~116 MB

-&gt; 4 MB more memory is used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>244187</commentid>
    <comment_count>12</comment_count>
    <who name="Janne Koskinen">koshuin</who>
    <bug_when>2010-06-29 03:46:38 -0700</bug_when>
    <thetext>I received 3 QtWebkit.dll dumps for comparison and all 3 were different in .code size and supposedly were built from the same source.

First, all builds are paged and thus bytepair compressed. You can cross that out from checklist.

Difference in largest and smallest build of QtWebkit 2.0 that I received had 3.5MB difference smallest being 8.5MB and largest 12MB

I bet largest build is statically linking against sqlite3.lib which has been an issue before. Search .mmp file for staticlibrary statement.
Difference between the middle sized 10.5MB and small 8.5MB is most likely -O3 and -OTime.

These differences could explain 4MB vs. 9MB increase in consumption. Or even it could explain it completely as 4.6.2 release was built using thumb. That is if 4.6 webkit in the report is 4.6.2 QtWebkit and not 4.6.3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>244240</commentid>
    <comment_count>13</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-06-29 05:50:44 -0700</bug_when>
    <thetext>(In reply to comment #12)
&gt; These differences could explain 4MB vs. 9MB increase in consumption. Or even it could explain it completely as 4.6.2 release was built using thumb. That is if 4.6 webkit in the report is 4.6.2 QtWebkit and not 4.6.3.

This sounds like a likely culprit!

I&apos;m preparing a patch to build JavaScriptCore as arm and the rest of WebKit in thumb mode.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>244246</commentid>
    <comment_count>14</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-06-29 05:56:18 -0700</bug_when>
    <thetext>Kent had another suggestion: It might be that the one or other magic constant in JSC changed with regards to the default allocation of various buffers, between when Qt 4.6&apos;s WebKit was branched and now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>244252</commentid>
    <comment_count>15</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-06-29 06:19:40 -0700</bug_when>
    <thetext>Great, compiling WebCore with thumb I get:

 FAILED compile for armv5_urel:  WebCore\generated\HTMLNames.cpp
  mmp: WebCore\WebCore_0x200267C2.mmp
   Internal fault: [0x040b:220686] in _ZN7WebCore9HTMLNames4initEv
   Please contact your supplier.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>244260</commentid>
    <comment_count>16</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-06-29 06:40:19 -0700</bug_when>
    <thetext>(In reply to comment #15)
&gt; Great, compiling WebCore with thumb I get:
&gt; 
&gt;  FAILED compile for armv5_urel:  WebCore\generated\HTMLNames.cpp
&gt;   mmp: WebCore\WebCore_0x200267C2.mmp
&gt;    Internal fault: [0x040b:220686] in _ZN7WebCore9HTMLNames4initEv
&gt;    Please contact your supplier.

Tracking this issue now in Bug #41349</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>244270</commentid>
    <comment_count>17</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-06-29 07:04:49 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; Ok, here are some measurements:
&gt; 
&gt; Device: N8
&gt; 
&gt; Application: QtTestBrowser using a plain QWebView
&gt; 
&gt; Qt 4.6 - 0b618c7739c904ff35572886dbded9113a517dc0
&gt; 
&gt; Website: news.google.com
&gt; 
&gt; Free ram: ~134 MB
&gt; 
&gt; Free ram with QtWebKit from Qt 4.6: ~120MB
&gt; 
&gt; Free ram with QtWebkit 2.0 (38d650efc92427cd6452f6685d3c40d22428cdb7) : ~116 MB
&gt; 
&gt; -&gt; 4 MB more memory is used.

Update on these numbers!

When QtWebKit as part of Qt 4.6 is built with arm instead of thumb - which is how it&apos;s shipped on the N8, then the memory consumption goes up by 2 MB, reducing the gap from 4 MB to 2 MB between Qt 4.6&apos;s WebKit and QtWebKit 2.0.

That means taking away build differences, it appears that QtWebKit 2.0 allocates two more megabytes of RAM in this setup with this site.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>244649</commentid>
    <comment_count>18</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2010-06-30 00:14:36 -0700</bug_when>
    <thetext>(In reply to comment #17)
&gt; (In reply to comment #11)
&gt; &gt; Ok, here are some measurements:
&gt; &gt; 
&gt; &gt; Device: N8
&gt; &gt; 
&gt; &gt; Application: QtTestBrowser using a plain QWebView
&gt; &gt; 
&gt; &gt; Qt 4.6 - 0b618c7739c904ff35572886dbded9113a517dc0
&gt; &gt; 
&gt; &gt; Website: news.google.com
&gt; &gt; 
&gt; &gt; Free ram: ~134 MB
&gt; &gt; 
&gt; &gt; Free ram with QtWebKit from Qt 4.6: ~120MB
&gt; &gt; 
&gt; &gt; Free ram with QtWebkit 2.0 (38d650efc92427cd6452f6685d3c40d22428cdb7) : ~116 MB
&gt; &gt; 
&gt; &gt; -&gt; 4 MB more memory is used.
&gt; 
&gt; Update on these numbers!

Have you tried with trunk to see how that compares?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>244691</commentid>
    <comment_count>19</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-06-30 01:58:17 -0700</bug_when>
    <thetext>(In reply to comment #18)
&gt; (In reply to comment #17)
&gt; &gt; (In reply to comment #11)
&gt; &gt; &gt; Ok, here are some measurements:
&gt; &gt; &gt; 
&gt; &gt; &gt; Device: N8
&gt; &gt; &gt; 
&gt; &gt; &gt; Application: QtTestBrowser using a plain QWebView
&gt; &gt; &gt; 
&gt; &gt; &gt; Qt 4.6 - 0b618c7739c904ff35572886dbded9113a517dc0
&gt; &gt; &gt; 
&gt; &gt; &gt; Website: news.google.com
&gt; &gt; &gt; 
&gt; &gt; &gt; Free ram: ~134 MB
&gt; &gt; &gt; 
&gt; &gt; &gt; Free ram with QtWebKit from Qt 4.6: ~120MB
&gt; &gt; &gt; 
&gt; &gt; &gt; Free ram with QtWebkit 2.0 (38d650efc92427cd6452f6685d3c40d22428cdb7) : ~116 MB
&gt; &gt; &gt; 
&gt; &gt; &gt; -&gt; 4 MB more memory is used.
&gt; &gt; 
&gt; &gt; Update on these numbers!
&gt; 
&gt; Have you tried with trunk to see how that compares?

Yep, with the trunk there&apos;s about 112MB RAM left after loading, which is even worse.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>244772</commentid>
    <comment_count>20</comment_count>
    <who name="Hao Lu">hao.1.lu</who>
    <bug_when>2010-06-30 07:47:51 -0700</bug_when>
    <thetext>The original reported bug https://bsetpl02.americas.nokia.com/browse/BR-3449 in Jira is no longer reproducible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>245154</commentid>
    <comment_count>21</comment_count>
    <who name="Jukka Jokiniva">jukka.jokiniva</who>
    <bug_when>2010-07-01 00:29:26 -0700</bug_when>
    <thetext>According to the reporter not repro any more =&gt; closed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>