<?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>71555</bug_id>
          
          <creation_ts>2011-11-04 05:33:28 -0700</creation_ts>
          <short_desc>[Qt] Compare WebCore and Qt ImageDecoders</short_desc>
          <delta_ts>2012-03-06 02:00:39 -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>Images</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>69515</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Zoltan Horvath">zoltan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>christian.sejersen</cc>
    
    <cc>hausmann</cc>
    
    <cc>kbalazs</cc>
    
    <cc>kimmo.t.kinnunen</cc>
    
    <cc>kling</cc>
    
    <cc>loki</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>496171</commentid>
    <comment_count>0</comment_count>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2011-11-04 05:33:28 -0700</bug_when>
    <thetext>The goal of this bug is to measure the performance and memory consumption differences between WebCore imagedecoders and QImageDecoder, furthermore - based on the results and the discussions - we should decide either to keep the current QImageDecoder implementation or change to WebCore&apos;s imagedecoders as we changed for WebCore&apos;s one for the N9 browser.

Setup: Slackware 13.1 - 32 bit, Intel(R) Core(TM)2 Duo CPU E6550  @ 2.33GHz, this is a dedicated pc for benchmarking purposes

# Memory consumption (Maximum Resident Set Size (RSS), based on kernels smaps information):

Methanol suite with 18 custom sites for benchmark imagedecoding. 
http://zoltan.sed.hu/WebKit/methanol_imgdecoder/fire.html?iter=1

 WebCoreImageDecoders: avg 295 624 kbytes +/- 1.6% (min: 290 804 kbytes, max: 303 334 kbytes)
 QtImageDecoders: avg 293 556 kbytes +/- 2.1% (min: 286 052 kbytes, max: 303 804 kbytes)

Methanol suite with the first individual 23 sites from alexa top100. (mirrored) 
http://zoltan.sed.hu/WebKit/methanolx/fire.html?iter=1

 WebCoreImageDecoders: avg 70 856 kbytes +/- 2.5% (min: 68 772 kbytes, max: 73 736 kbytes)
 QtImageDecoders: avg 70 639 kbytes +/- 1.1% (min: 70 056 kbytes, max: 72 016 kbytes)

As we see there are no big differences in the numbers, the memory consumption is almost the same with both type of implementation.

# Performance (Methanol provided the results)

http://zoltan.sed.hu/WebKit/methanol_imgdecoder/fire.html?iter=1
 QtImageDecoders: avg 15 632 ms +/- 5.1% (min: 14 344ms, max: 16 406ms)
 WebCoreImageDecoders: avg 20 895 ms +/- 5.6% (min: 19 116ms, max: 22314ms)

WebCoreImageDecoder is 33.6% slower.

Methanol suite with the first individual 23 sites from alexa top100. (mirrored) 
http://zoltan.sed.hu/WebKit/methanolx/fire.html?iter=1
 QtImageDecoders: avg 7 492ms +/- 6.5% (min: 7 124ms, max: 8 216ms)
 WebCoreImageDecoders: avg 7 798ms +/- 9.06% (min: 7 332ms, max: 9 153ms)

WebCoreImageDecoder is 4.08% slower.

Based on this results I think we will keep QImageDecoders, but I&apos;m interested in your thoughts!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496172</commentid>
    <comment_count>1</comment_count>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2011-11-04 05:34:55 -0700</bug_when>
    <thetext>I did the measurements with the latest Qt 4.8. If anyone would like to reproduce the results I&apos;d gladly upload my WebCoreImgDecoders patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496193</commentid>
    <comment_count>2</comment_count>
      <attachid>113655</attachid>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2011-11-04 07:41:11 -0700</bug_when>
    <thetext>Created attachment 113655
alexa top150

I run the robotized version of QtLauncher for the attached sites.txt, what contains the first 150 urls from today&apos;s Alexa Top 1,000,000.

MaxRSS

WebCoreImageDecoders: 196 576 kbytes 
QtImageDecoders: 189 000 kbytes

I will run the benchmark again to verify the results and I will do measurements for performance on Monday.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497021</commentid>
    <comment_count>3</comment_count>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2011-11-07 01:42:39 -0800</bug_when>
    <thetext>(In reply to comment #2)

&gt; I will run the benchmark again to verify the results and I will do measurements for performance on Monday.

On Tuesday.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>497942</commentid>
    <comment_count>4</comment_count>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2011-11-08 04:33:08 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)

I finished memory consumption measurements for the first 150 sites from alexa.

 WebCoreImageDecoders: avg 206 288 kbytes +/- 5.2% (min: 197 644 kbytes, max: 221 216 kbytes)
 QtImageDecoders: avg 202 241 kbytes +/- 2.4% (min: 197 748 kbytes, max: 208 584 kbytes)

I need to use webpagereplay for performance measurements to leave network connection out of account, so it will take some time. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>498885</commentid>
    <comment_count>5</comment_count>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2011-11-09 06:35:25 -0800</bug_when>
    <thetext>(In reply to comment #4)

&gt; I need to use webpagereplay for performance measurements to leave network connection out of account, so it will take some time. :)

Well, I finished performance measurements for the first top150 alexa sites.


 WebCoreImageDecoders: avg 187 051ms +/- 0.3% (min: 185 725ms, max: 189 019ms)
 QtImageDecoders: avg 187 309ms +/- 0.7% (min: 186 243 ms, max: 188 210ms)

Hmm, in this test case the results are similar... what is not surprising, since both implementation use the same system libraries.

Any thoughts based on results?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>500876</commentid>
    <comment_count>6</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2011-11-11 10:12:10 -0800</bug_when>
    <thetext>Kimmo, do you recall what was the actual reason of switching?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>505645</commentid>
    <comment_count>7</comment_count>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2011-11-18 03:15:56 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; Kimmo, do you recall what was the actual reason of switching?

Kimmo, ping! :) I&apos;m curious to hear your answer!


Other topic:

I made a statistics on loaded image dimensions and I classify them into some groups:

x,y,z := pixels

 (x)    (y)      (x*y) count(x*y)
   2      2          4        553
   4      4         16         22 (4 &lt; z &lt;= 16)
   8      8         64         74 (16 &lt; z &lt;= 64)
  16     16        256        293 ...
  32     32       1024        249
  64     64       4096        596
 128    128      16384       1032
 256    256      65536       1080
 512    512     262144        297
1024   1024    1048576         89
2048   2048    4194304          7
3072   3072    9437184          0
4096   4096   16777216          0

In the case of x*y &lt; 4px there are 125 0*0px  and 394 1*1px images.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553954</commentid>
    <comment_count>8</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2012-02-10 02:00:41 -0800</bug_when>
    <thetext>Related bug in this context for a switch: bug #32410</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>571661</commentid>
    <comment_count>9</comment_count>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2012-03-06 02:00:39 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; Related bug in this context for a switch: bug #32410

Related bugs: 
- bug #80398
- bug #80400

I close this bug, further measurement isn&apos;t needed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>113655</attachid>
            <date>2011-11-04 07:41:11 -0700</date>
            <delta_ts>2011-11-04 07:41:11 -0700</delta_ts>
            <desc>alexa top150</desc>
            <filename>sites.txt</filename>
            <type>text/plain</type>
            <size>2826</size>
            <attacher name="Zoltan Horvath">zoltan</attacher>
            
              <data encoding="base64">aHR0cDovL2dvb2dsZS5jb20KaHR0cDovL2ZhY2Vib29rLmNvbQpodHRwOi8veW91dHViZS5jb20K
aHR0cDovL3lhaG9vLmNvbQpodHRwOi8vd2lraXBlZGlhLm9yZwpodHRwOi8vYmFpZHUuY29tCmh0
dHA6Ly9ibG9nc3BvdC5jb20KaHR0cDovL2xpdmUuY29tCmh0dHA6Ly90d2l0dGVyLmNvbQpodHRw
Oi8vcXEuY29tCmh0dHA6Ly9hbWF6b24uY29tCmh0dHA6Ly9saW5rZWRpbi5jb20KaHR0cDovL21z
bi5jb20KaHR0cDovL3lhaG9vLmNvLmpwCmh0dHA6Ly90YW9iYW8uY29tCmh0dHA6Ly9nb29nbGUu
Y28uaW4KaHR0cDovL3NpbmEuY29tLmNuCmh0dHA6Ly93b3JkcHJlc3MuY29tCmh0dHA6Ly9nb29n
bGUuZGUKaHR0cDovL2FwcGxlLmNvbQpodHRwOi8vZ29vZ2xlLmNvbS5oawpodHRwOi8vZWJheS5j
b20KaHR0cDovL3lhbmRleC5ydQpodHRwOi8vZ29vZ2xlLmNvLnVrCmh0dHA6Ly9nb29nbGUuY28u
anAKaHR0cDovL2dvb2dsZS5mcgpodHRwOi8vYmluZy5jb20KaHR0cDovL3QuY28KaHR0cDovL21p
Y3Jvc29mdC5jb20KaHR0cDovL3dlaWJvLmNvbQpodHRwOi8vbWFpbC5ydQpodHRwOi8vMTYzLmNv
bQpodHRwOi8vZ29vZ2xlLmNvbS5icgpodHRwOi8vcGF5cGFsLmNvbQpodHRwOi8vZmxpY2tyLmNv
bQpodHRwOi8vZ29vZ2xlLml0Cmh0dHA6Ly9z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