<?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>44374</bug_id>
          
          <creation_ts>2010-08-20 19:46:42 -0700</creation_ts>
          <short_desc>Changing cx/cy causes SVGCircleElement to regenerate path data when not needed</short_desc>
          <delta_ts>2012-06-23 13:39:33 -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>SVG</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</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>44402</blocked>
    
    <blocked>44375</blocked>
    
    <blocked>65236</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>kbr</cc>
    
    <cc>krit</cc>
    
    <cc>pdr</cc>
    
    <cc>rwlbuis</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>267512</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-08-20 19:46:42 -0700</bug_when>
    <thetext>Changing cx/cy causes SVGCircleElement to regenerate path data when not needed

http://themaninblue.com/experiment/AnimationBenchmark/svg

source: http://themaninblue.com/experiment/AnimationBenchmark/svg/js/main.js

We&apos;re spending 7% of that benchmark regenerating path data for the circles which is unnecessary.  (45% is spent in RenderPath::paint().)  If instead we used a transform for the cx/cy, we could always draw the circle around 0 and not need to regen the path when cx/cy changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>267520</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-08-20 19:59:14 -0700</bug_when>
    <thetext>Layout is close to 16% of that benchmark.  We&apos;d still need to do a layout, but the layout cost would be very small if we could avoid needing to regenerate the path.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>267532</commentid>
    <comment_count>2</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2010-08-20 21:58:19 -0700</bug_when>
    <thetext>We could realy use the unite circle and just transform it according to x,y,cx,cy. But that causes some changes, first we would need to store the Path&apos;s in the elements (rect,circle,path,polygon,line,...). And we should also get rid of the current ellipse logic in Path::createEllipse and let the platforms draw the circle.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>267566</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-08-21 07:33:49 -0700</bug_when>
    <thetext>As noted in bug 44375, path copying is really expensive.  So all of our Path::create* functions which return a path, cause a copy.  I think we should consider using the unit circle as you suggest.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>267577</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-08-21 09:41:54 -0700</bug_when>
    <thetext>I downloaded the benchmark locally (http://themaninblue.com/experiment/AnimationBenchmark/benchmarks.zip) and modified the SVG benchmark to use transforms instead of setting cx/cy.  We spend 6% time under layout() instead of 16%! (basically working around this bug).  But our framerate still tops out at 30fps.  Maybe we&apos;re hitting some sort of framerate cap?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>267579</commentid>
    <comment_count>5</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2010-08-21 09:45:11 -0700</bug_when>
    <thetext>Commented on the wrong bug, see https://bugs.webkit.org/show_bug.cgi?id=44375#c6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>267583</commentid>
    <comment_count>6</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2010-08-21 10:01:37 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; I downloaded the benchmark locally (http://themaninblue.com/experiment/AnimationBenchmark/benchmarks.zip) and modified the SVG benchmark to use transforms instead of setting cx/cy.  We spend 6% time under layout() instead of 16%! 

Well, if you modify the test in that way, we don&apos;t invalidate the path. Means, you avoid the copy process from SVG*Element to SVGRenderPath as well. That&apos;s what I mean with store the path in the element in comment #2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>443536</commentid>
    <comment_count>7</comment_count>
    <who name="Rob Buis">rwlbuis</who>
    <bug_when>2011-07-28 10:12:55 -0700</bug_when>
    <thetext>Implementing https://bugs.webkit.org/show_bug.cgi?id=65236 could make this bug unneeded. We should keep themaninblue benchmark in mind though for 65236.
Cheers,

Rob.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>547639</commentid>
    <comment_count>8</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2012-02-01 21:49:46 -0800</bug_when>
    <thetext>Reni, are you continuing you work on RenderSVGShape, so that this bug get unnecessary?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>656130</commentid>
    <comment_count>9</comment_count>
    <who name="Philip Rogers">pdr</who>
    <bug_when>2012-06-23 13:39:33 -0700</bug_when>
    <thetext>Fixed in http://trac.webkit.org/changeset/112667</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>