title: RaphaelJS huge slowdowns in IE8 when editing attr() and text() (fill, stroke, weight) of elements
body: <p>I'm debugging some performance issues in IE8 with RaphaelJS. We're building graphs from ~1000 elements and text nodes in raphael and in particular one graph is causing us problems when it's rendering. In IE9 it takes 2-7 seconds depending on the machine to render, and in IE8 1 minute plus. </p>
  
  <p>You can see <a href="http://greenbuildingsalive.com/datatools/pulse" rel="nofollow">the website in question here</a>. It's the 3rd graph (click it).</p>
  
  <p>Essentially we create elements for each point of data and draw them on the raphael canvas.</p>
  
  <p>I've used the IE Developer Tools profiler and determined that it's the <code>setFillAndStroke()</code> function called from both <code>attr()</code> and <code>text()</code> when we change the fill, stroke, style and a few other settings of elements. The <code>getBoundingRect()</code> function is the culprit in <code>setFillAndStroke()</code>.</p>
  
  <p>Here is a <a href="http://i.imgur.com/fhH6Q.jpg" rel="nofollow">screenshot of the profiler output</a></p>
  
  <p>In my research I've come across people having issues with IE8, <code>attr()</code> and <code>text()</code>, e.g., </p>
  
  <p>So a few questions:</p>
  
  <ol>
  <li>Can you set a 'default' fill and stroke for Raphael elements so that they are created with that fill and stroke? This should remove the call to <code>getClientBoundingRect()</code>. I've tried looking for such a function in the docs but no luck.</li>
  <li>Is this something we can solve without changing the look and feel of the graphs?</li>
  <li>If this is something we can do just through the code, is it possible to do so without modifying RaphaelJS?</li>
  <li>Any other ideas?</li>
  </ol>
  
  <p>Someone seemed to have a similar problem in older versions of Raphael, apparently fixed in 2.0.0 but we're using version 2.0.2 (tested to also have the same issue in 2.1.0).</p>
  
  <p>Here is the <a href="https://github.com/DmitryBaranovskiy/raphael/issues/216" rel="nofollow">issue report on github</a>.</p>