<?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>85258</bug_id>
          
          <creation_ts>2012-04-30 21:15:40 -0700</creation_ts>
          <short_desc>Early-out for subtracting a non-intersecting region</short_desc>
          <delta_ts>2012-05-02 12:27:05 -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>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>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dana Jansens">danakj</reporter>
          <assigned_to name="Dana Jansens">danakj</assigned_to>
          <cc>andersca</cc>
    
    <cc>backer</cc>
    
    <cc>darin</cc>
    
    <cc>enne</cc>
    
    <cc>jamesr</cc>
    
    <cc>piman</cc>
    
    <cc>vangelis</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>613218</commentid>
    <comment_count>0</comment_count>
    <who name="Dana Jansens">danakj</who>
    <bug_when>2012-04-30 21:15:40 -0700</bug_when>
    <thetext>Early-out for subtracting a non-intersecting region</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>613219</commentid>
    <comment_count>1</comment_count>
      <attachid>139578</attachid>
    <who name="Dana Jansens">danakj</who>
    <bug_when>2012-04-30 21:20:02 -0700</bug_when>
    <thetext>Created attachment 139578
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>613313</commentid>
    <comment_count>2</comment_count>
      <attachid>139578</attachid>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2012-05-01 02:05:59 -0700</bug_when>
    <thetext>Comment on attachment 139578
Patch

Harvest all low hanging fruits!!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>613315</commentid>
    <comment_count>3</comment_count>
      <attachid>139578</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-05-01 02:14:28 -0700</bug_when>
    <thetext>Comment on attachment 139578
Patch

Clearing flags on attachment: 139578

Committed r115716: &lt;http://trac.webkit.org/changeset/115716&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>613316</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-05-01 02:14:33 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>613606</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2012-05-01 13:14:18 -0700</bug_when>
    <thetext>Is this change for better performance or is it related to correctness? If it’s for better performance, what test demonstrates the improvement? How good is the improvement?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>613618</commentid>
    <comment_count>6</comment_count>
    <who name="Dana Jansens">danakj</who>
    <bug_when>2012-05-01 13:32:20 -0700</bug_when>
    <thetext>It is for performance, if you subtract a Region that does not intersect, you would make a memcpy of the orignal region. Region copies are showing themselves to be very costly, you can see some backstory here https://bugs.webkit.org/show_bug.cgi?id=81076

I must confess I&apos;m not sure what you mean by a test though, we use unit tests and layout tests to verify correctness, but I&apos;ve never been asked to write a test to show performance differences.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>613619</commentid>
    <comment_count>7</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2012-05-01 13:37:02 -0700</bug_when>
    <thetext>Most performance-driven changes include information about some kind of performance test and data about the results before and after the code change. I can find you examples if you haven’t seen that in the WebKit project before.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>613624</commentid>
    <comment_count>8</comment_count>
    <who name="Dana Jansens">danakj</who>
    <bug_when>2012-05-01 13:43:53 -0700</bug_when>
    <thetext>Sure, I&apos;d love a good example, thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>614526</commentid>
    <comment_count>9</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2012-05-02 12:27:05 -0700</bug_when>
    <thetext>I’m not sure these are the best examples, but three I found with a quick search are these:

http://trac.webkit.org/changeset/114912
http://trac.webkit.org/changeset/114351
http://trac.webkit.org/changeset/112387</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>139578</attachid>
            <date>2012-04-30 21:20:02 -0700</date>
            <delta_ts>2012-05-01 02:14:28 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-85258-20120501002001.patch</filename>
            <type>text/plain</type>
            <size>1439</size>
            <attacher name="Dana Jansens">danakj</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTE1NjU1CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggZDE1N2Q2YzA2MDA2YzNm
ZjE3NzY1NWI0YmZmMTNmYTViNWFlNzVmYi4uZWZmOWJiYWVlYmUyODI3ZGI3ZDk3ZTA2NWRmNTVj
NzU5NmIyODcwMCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE3IEBACisyMDEyLTA0LTMwICBEYW5h
IEphbnNlbnMgIDxkYW5ha2pAY2hyb21pdW0ub3JnPgorCisgICAgICAgI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