<?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>50804</bug_id>
          
          <creation_ts>2010-12-10 00:38:57 -0800</creation_ts>
          <short_desc>[chromium] Reduce canvas.toDataURL(&quot;image/jpeg&quot;) run-time cost by 10%</short_desc>
          <delta_ts>2010-12-17 01:49:09 -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>Canvas</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 7</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="noel gordon">noel.gordon</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hbono</cc>
    
    <cc>levin</cc>
    
    <cc>mdelaney7</cc>
    
    <cc>mikelawther</cc>
    
    <cc>senorblanco</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>320005</commentid>
    <comment_count>0</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2010-12-10 00:38:57 -0800</bug_when>
    <thetext>Reduce canvas.toDataURL(&quot;image/jpeg&quot;) run-time cost by 10%</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320010</commentid>
    <comment_count>1</comment_count>
      <attachid>76173</attachid>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2010-12-10 00:58:34 -0800</bug_when>
    <thetext>Created attachment 76173
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320011</commentid>
    <comment_count>2</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-12-10 01:00:16 -0800</bug_when>
    <thetext>Attachment 76173 did not pass style-queue:

Failed to run &quot;[&apos;WebKitTools/Scripts/check-webkit-style&apos;, &apos;--diff-files&apos;, u&apos;WebCore/ChangeLog&apos;, u&apos;WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp&apos;]&quot; exit_code: 1
WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp:86:  One or more unexpected \r (^M) found; better to use only a \n  [whitespace/carriage_return] [1]
Suppressing further [whitespace/carriage_return] reports for this file.
WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp:37:  Alphabetical sorting problem.  [build/include_order] [4]
WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp:90:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 12 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320013</commentid>
    <comment_count>3</comment_count>
      <attachid>76174</attachid>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2010-12-10 01:06:04 -0800</bug_when>
    <thetext>Created attachment 76174
patch

style: can&apos;t avoid the non-alphabetical include ordering nit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320014</commentid>
    <comment_count>4</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2010-12-10 01:07:48 -0800</bug_when>
    <thetext>so I expected to nitted again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320015</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-12-10 01:08:49 -0800</bug_when>
    <thetext>Attachment 76174 did not pass style-queue:

Failed to run &quot;[&apos;WebKitTools/Scripts/check-webkit-style&apos;, &apos;--diff-files&apos;, u&apos;WebCore/ChangeLog&apos;, u&apos;WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp&apos;]&quot; exit_code: 1
WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp:37:  Alphabetical sorting problem.  [build/include_order] [4]
WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp:90:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320026</commentid>
    <comment_count>6</comment_count>
      <attachid>76174</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-12-10 01:38:23 -0800</bug_when>
    <thetext>Comment on attachment 76174
patch

You should consider using webkit-patch upload to upload your patches so that they get marked properly as patch files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320027</commentid>
    <comment_count>7</comment_count>
      <attachid>76174</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-12-10 01:40:51 -0800</bug_when>
    <thetext>Comment on attachment 76174
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=76174&amp;action=review

It&apos;s a little surprising that this unroll makes things faster, but OK.   Are you certain in the stability of your numbers?

&gt; WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp:90
&gt; +        if ((alpha != 0) &amp;&amp; (alpha != 255)) {

We generally use just &quot;alpha&quot; instead of &quot;alpha != 0&quot;, but it might be OK here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320911</commentid>
    <comment_count>8</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2010-12-12 17:40:43 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (From update of attachment 76174 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=76174&amp;action=review
&gt; 
&gt; It&apos;s a little surprising that this unroll makes things faster, but OK.   Are you certain in the stability of your numbers?

Test image is 1800 x 1350 px JPEG.  I load it into a &lt;canvas&gt; and then I do back-to-back canvas.toDataURL(&quot;image/jpeg&quot;)
calls in js, logging the time as I go.  My results are:

Safari 5.0.2 win32 (7533.18.5):
 12:15:45:062 extract image/jpeg 145 ms length: 667763 bytes
 12:15:45:214 extract image/jpeg 146 ms length: 667763 bytes
 12:15:45:366 extract image/jpeg 146 ms length: 667763 bytes
 12:15:45:517 extract image/jpeg 145 ms length: 667763 bytes
 12:15:45:668 extract image/jpeg 145 ms length: 667763 bytes
 12:15:45:819 extract image/jpeg 144 ms length: 667763 bytes
 12:15:45:970 extract image/jpeg 144 ms length: 667763 bytes
 12:15:46:122 extract image/jpeg 145 ms length: 667763 bytes
 12:15:46:273 extract image/jpeg 145 ms length: 667763 bytes
 12:15:46:424 extract image/jpeg 145 ms length: 667763 bytes
 12:15:46:575 extract image/jpeg 144 ms length: 667763 bytes

Chrome ToT win32:
 12:09:16:144 extract image/jpeg 129 ms length: 630179 bytes
 12:09:16:301 extract image/jpeg 130 ms length: 630179 bytes
 12:09:16:458 extract image/jpeg 130 ms length: 630179 bytes
 12:09:16:617 extract image/jpeg 130 ms length: 630179 bytes
 12:09:16:752 extract image/jpeg 130 ms length: 630179 bytes
 12:09:16:909 extract image/jpeg 129 ms length: 630179 bytes
 12:09:17:044 extract image/jpeg 129 ms length: 630179 bytes
 12:09:17:203 extract image/jpeg 130 ms length: 630179 bytes
 12:09:17:339 extract image/jpeg 130 ms length: 630179 bytes
 12:09:17:474 extract image/jpeg 130 ms length: 630179 bytes
 12:09:17:632 extract image/jpeg 130 ms length: 630179 bytes

Chrome ToT win32 with this change:
 12:13:14:649 extract image/jpeg 115 ms length: 630179 bytes
 12:13:14:769 extract image/jpeg 115 ms length: 630179 bytes
 12:13:14:891 extract image/jpeg 114 ms length: 630179 bytes
 12:13:15:011 extract image/jpeg 114 ms length: 630179 bytes
 12:13:15:131 extract image/jpeg 115 ms length: 630179 bytes
 12:13:15:253 extract image/jpeg 115 ms length: 630179 bytes
 12:13:15:373 extract image/jpeg 115 ms length: 630179 bytes
 12:13:15:494 extract image/jpeg 115 ms length: 630179 bytes
 12:13:15:617 extract image/jpeg 115 ms length: 630179 bytes
 12:13:15:738 extract image/jpeg 115 ms length: 630179 bytes
 12:13:15:857 extract image/jpeg 114 ms length: 630179 bytes

worth it?

&gt; &gt; WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp:90
&gt; &gt; +        if ((alpha != 0) &amp;&amp; (alpha != 255)) {
&gt; 
&gt; We generally use just &quot;alpha&quot; instead of &quot;alpha != 0&quot;, but it might be OK here.

agree, OK here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320952</commentid>
    <comment_count>9</comment_count>
      <attachid>76174</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-12-13 00:20:34 -0800</bug_when>
    <thetext>Comment on attachment 76174
patch

Those are definitely small numbers. :)  But 10% is still 10%.  Woud be even better if we had a benchmark for this sort of thing, but 115ms is pretty small already. :)  WebCore/benchmarks is where such a benchmark would go.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320973</commentid>
    <comment_count>10</comment_count>
      <attachid>76174</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-12-13 01:12:15 -0800</bug_when>
    <thetext>Comment on attachment 76174
patch

Clearing flags on attachment: 76174

Committed r73890: &lt;http://trac.webkit.org/changeset/73890&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>320975</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-12-13 01:12:21 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>321115</commentid>
    <comment_count>12</comment_count>
      <attachid>76174</attachid>
    <who name="Stephen White">senorblanco</who>
    <bug_when>2010-12-13 07:46:02 -0800</bug_when>
    <thetext>Comment on attachment 76174
patch

I&apos;m fine with this change, but I&apos;m surprised that putting the conditional in the loop doesn&apos;t make performance worse.  Perhaps your tests are mostly alpha 255 or 0, and are benefiting disproportionately from branch prediction?

You could also look at writing an int at a time to the output, rather than a char at a time.  Of course, this would require unrolling 3X or so in order to write RGBR GBRG BRGB, kind of a pain, but usually nets a good speedup.

If this continues to be a bottleneck, it might be worth looking at an SSE2 version as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>321633</commentid>
    <comment_count>13</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2010-12-13 20:02:07 -0800</bug_when>
    <thetext>&gt; Those are definitely small numbers. :)  But 10% is still 10%.  Woud be even better if we had a benchmark for this sort of thing, but 115ms is pretty small already. :)  WebCore/benchmarks is where such a benchmark would go.

Happy to take the 10%, we are about to get faster still.  hbono is is working
on bug 50054, which should make the encoding phase 3x faster.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>321640</commentid>
    <comment_count>14</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2010-12-13 20:37:32 -0800</bug_when>
    <thetext>(In reply to comment #12)
&gt; I&apos;m fine with this change, but I&apos;m surprised that putting the conditional in the loop doesn&apos;t make performance worse.
&gt; Perhaps your tests are mostly alpha 255 or 0, and are benefiting disproportionately from branch prediction?

Apply the first statement to canvas.getImageData and canvas.putImageData :)  But yes, I believe the else branch
benefits from alpha 0|255 and that it also exposes the cost of the existing &quot;lookup&quot; table.  This is not new idea;
see the PNG ncoder implementation in the skia repository for example.

 
&gt; You could also look at writing an int at a time to the output, rather than a char at a time.  Of course, this would
&gt; require unrolling 3X or so in order to write RGBR GBRG BRGB, kind of a pain, but usually nets a good speedup.

Yes a pain.  Would it be better to build premultipication/unpremultiplication tables?

http://mxr.mozilla.org/mozilla2.0/source/content/canvas/src/nsCanvasRenderingContext2D.cpp#3917
http://mxr.mozilla.org/mozilla2.0/source/content/canvas/src/nsCanvasRenderingContext2D.cpp#3996


&gt; If this continues to be a bottleneck, it might be worth looking at an SSE2 version as well.

Indeed, hbono suggested exactly that approach, in particular that he could implement the (un)premultiplication via
SSE or  MMX.  I&apos;m awaiting the result of his bug 50054 (I&apos;m not synced to it yet) to measure the expected encoding
phase speed-up (3x), and to consider if the unpremultiplication is a &quot;bottleneck&quot; worth more optimization ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322423</commentid>
    <comment_count>15</comment_count>
    <who name="Hironori Bono">hbono</who>
    <bug_when>2010-12-14 18:21:02 -0800</bug_when>
    <thetext>(In reply to comment #13)
&gt; Happy to take the 10%, we are about to get faster still.  hbono is is working
&gt; on bug 50054, which should make the encoding phase 3x faster.

This is just for your information. I have been integrating premultiply/unpremultiply operations into libjpeg-turbo so we can directly use skia pixels, i.e. we don&apos;t need Vector&lt;JSAMPLE&gt;. For those who are interested in it, I have uploaded a part of this change (only unpremultiply operations for SSE) to Rietveld: &lt;http://codereview.chromium.org/5862001/&gt;.

Regards,</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322498</commentid>
    <comment_count>16</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2010-12-14 21:44:02 -0800</bug_when>
    <thetext>(In reply to comment #14)
&gt; (In reply to comment #12)
&gt; &gt; I&apos;m fine with this change, but I&apos;m surprised that putting the conditional in the loop doesn&apos;t make performance worse.
&gt; &gt; Perhaps your tests are mostly alpha 255 or 0, and are benefiting disproportionately from branch prediction?
&gt; 
&gt; Apply the first statement to canvas.getImageData and canvas.putImageData :)  

correction, those are templated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322522</commentid>
    <comment_count>17</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2010-12-14 23:59:43 -0800</bug_when>
    <thetext>(In reply to comment #15)
@hbono thanks for http://codereview.chromium.org/5862001, sounds good.  I should note, be aware of 
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11431</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>323661</commentid>
    <comment_count>18</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2010-12-17 01:49:09 -0800</bug_when>
    <thetext>http://www.w3.org/Bugs/Public/show_bug.cgi?id=11431 is easy to resolve - the spec is correct.

Opened bug 51237 to correct chromium.  It&apos;s related to this bug, and we maintain the speedup
mentioned here, but there&apos;s no need to unpremultiply RGB.  See bug 51237 for details.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>76173</attachid>
            <date>2010-12-10 00:58:34 -0800</date>
            <delta_ts>2010-12-10 01:06:04 -0800</delta_ts>
            <desc>patch</desc>
            <filename>git-diff.patch</filename>
            <type>text/plain</type>
            <size>2522</size>
            <attacher name="noel gordon">noel.gordon</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
YjZlMjMwMC4uZThiYTM4YSAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxOSBAQAorMjAxMC0xMi0xMCAgTm9lbCBHb3Jkb24g
IDxub2VsLmdvcmRvbkBnbWFpbC5jb20+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChP
T1BTISkuCisKKyAgICAgICAgW2Nocm9taXVtXSBSZWR1Y2UgY2FudmFzLnRvRGF0YVVSTCgiaW1h
Z2UvanBlZyIpIHJ1bi10aW1lIGNvc3QgYnkgMTAlCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJr
aXQub3JnL3Nob3dfYnVnLmNnaT9pZD01MDgwNAorCisgICAgICAgIEZvbGxvdyBvbiBmcm9tIHI3
MzE3MywgdW5yb2xsIHRoZSBTa1VuUHJlTXVsdGlwbHk6OlBNQ29sb3JUb0NvbG9yKCkgY2FsbAor
ICAgICAgICB2aXouLCBjb21wdXRlIHRoZSB1bnByZ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3V0cHV0KysgPSBTa1VuUHJlTXVsdGlwbHk6OkFwcGx5U2NhbGUoc2Nh
bGVbYWxwaGFdLCBTa0dldFBhY2tlZFIzMigqaW5wdXQpKTsNCisgICAgICAgICAgICAqb3V0cHV0
KysgPSBTa1VuUHJlTXVsdGlwbHk6OkFwcGx5U2NhbGUoc2NhbGVbYWxwaGFdLCBTa0dldFBhY2tl
ZEczMigqaW5wdXQpKTsNCisgICAgICAgICAgICAqb3V0cHV0KysgPSBTa1VuUHJlTXVsdGlwbHk6
OkFwcGx5U2NhbGUoc2NhbGVbYWxwaGFdLCBTa0dldFBhY2tlZEIzMigqaW5wdXQpKTsNCisgICAg
ICAgIH0gZWxzZSB7DQorICAgICAgICAgICAgKm91dHB1dCsrID0gU2tHZXRQYWNrZWRSMzIoKmlu
cHV0KTsKKyAgICAgICAgICAgICpvdXRwdXQrKyA9IFNrR2V0UGFja2VkRzMyKCppbnB1dCk7Cisg
ICAgICAgICAgICAqb3V0cHV0KysgPSBTa0dldFBhY2tlZEIzMigqaW5wdXQpOworICAgICAgICB9
DQogICAgIH0KIH0KIAo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>76174</attachid>
            <date>2010-12-10 01:06:04 -0800</date>
            <delta_ts>2010-12-13 07:46:01 -0800</delta_ts>
            <desc>patch</desc>
            <filename>git-diff.patch</filename>
            <type>text/plain</type>
            <size>2512</size>
            <attacher name="noel gordon">noel.gordon</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
YjZlMjMwMC4uZThiYTM4YSAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxOSBAQAorMjAxMC0xMi0xMCAgTm9lbCBHb3Jkb24g
IDxub2VsLmdvcmRv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VubXVsdGlw
bGllZCk7Ci0gICAgICAgICpvdXRwdXQrKyA9IFNrQ29sb3JHZXRCKHVubXVsdGlwbGllZCk7Cisg
ICAgc3RhdGljIGNvbnN0IFNrVW5QcmVNdWx0aXBseTo6U2NhbGUqIHNjYWxlID0gU2tVblByZU11
bHRpcGx5OjpHZXRTY2FsZVRhYmxlKCk7CisKKyAgICBmb3IgKDsgcGl4ZWxzLS0gPiAwOyArK2lu
cHV0KSB7CisgICAgICAgIGNvbnN0IHVuc2lnbmVkIGFscGhhID0gU2tHZXRQYWNrZWRBMzIoKmlu
cHV0KTsKKyAgICAgICAgaWYgKChhbHBoYSAhPSAwKSAmJiAoYWxwaGEgIT0gMjU1KSkgeworICAg
ICAgICAgICAgKm91dHB1dCsrID0gU2tVblByZU11bHRpcGx5OjpBcHBseVNjYWxlKHNjYWxlW2Fs
cGhhXSwgU2tHZXRQYWNrZWRSMzIoKmlucHV0KSk7CisgICAgICAgICAgICAqb3V0cHV0KysgPSBT
a1VuUHJlTXVsdGlwbHk6OkFwcGx5U2NhbGUoc2NhbGVbYWxwaGFdLCBTa0dldFBhY2tlZEczMigq
aW5wdXQpKTsKKyAgICAgICAgICAgICpvdXRwdXQrKyA9IFNrVW5QcmVNdWx0aXBseTo6QXBwbHlT
Y2FsZShzY2FsZVthbHBoYV0sIFNrR2V0UGFja2VkQjMyKCppbnB1dCkpOworICAgICAgICB9IGVs
c2UgeworICAgICAgICAgICAgKm91dHB1dCsrID0gU2tHZXRQYWNrZWRSMzIoKmlucHV0KTsKKyAg
ICAgICAgICAgICpvdXRwdXQrKyA9IFNrR2V0UGFja2VkRzMyKCppbnB1dCk7CisgICAgICAgICAg
ICAqb3V0cHV0KysgPSBTa0dldFBhY2tlZEIzMigqaW5wdXQpOworICAgICAgICB9CiAgICAgfQog
fQogCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>