Thank you Carl and Vlad for your helpful explanations.&nbsp; I&#39;m also very impressed with the general activity on the mailing list.<br><br>After reading your explanations, a lot of issues I&#39;ve been noticing (in addition to the ones I previously mentioned) make more sense.&nbsp; I am indeed doing a lot of drawing at non-integer pixel values.&nbsp; It is a bit troubling to hear that there isn&#39;t really an easy solution at this point, but it seems I could do the following things to improve performance:<br>
<br>1.&nbsp; Before doing any drawing, translate the entire surface by .5 pixels horizontally and vertically so that even integer values land on the boundaries between pixels and not in the middle of pixels.&nbsp; Also, I should use only integer values for line widths.<br>
<br>2.&nbsp; Break long diagonal lines up into smaller diagonal lines so that the overall needless computation is lowered.<br><br>Any other ideas?&nbsp; Should I keep antialiasing off?&nbsp; Is it worth updating from 1.8.0 to the most recent 1.8.2 with respect to these issues?<br>
<br>Thanks again for your help!<br><br>Giles<br><br><br><div class="gmail_quote">On Fri, Oct 31, 2008 at 1:03 PM, Carl Worth <span dir="ltr">&lt;<a href="mailto:cworth@cworth.org">cworth@cworth.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Fri, 2008-10-31 at 12:41 -0700, Vladimir Vukicevic wrote:<br>
&gt; But since you&#39;re hitting the general case, the first thing that happens<br>
&gt; is that a large temporary surface big enough to encompass the set of<br>
&gt; trapezoids to be rendered is created -- in your case somewhere around<br>
&gt; 1200 x 950. &nbsp;The trapezoids are rendered to that, and then that surface<br>
&gt; is used as a mask for the final filling operation. &nbsp;You can see the<br>
&gt; problem -- that&#39;s a large surface, and you&#39;re both rendering to it and<br>
&gt; then compositing with it, not to mention creating/destroying it just to<br>
&gt; execute that simple stroke!<br>
<br>
</div>Ah, of course. Thanks for explaining that Vlad.<br>
<div class="Ih2E3d"><br>
&gt; For the diagonal case, it&#39;s not possible to optimize it as rectangular<br>
&gt; fills, so you end up creating the large temporary surface which can<br>
&gt; contain the entire diagonal line (which is essentially the worst case<br>
&gt; scenario).<br>
&gt;<br>
&gt; big-diagonal-lines would actually make a great perf test...<br>
<br>
</div>Yes, we definitely need to do better on that. Even without a big change<br>
to the rasterizer it should be obvious that even just breaking up the<br>
geometry into smaller segments would perform much better, (as the<br>
smaller intermediate masks would no longer include large regions of<br>
useless compositing). So we should start tracking this in cairo-perf and<br>
see what we can do to make this case faster in cairo itself, (without<br>
the application needing to slice up its geometry in silly ways).<br>
<font color="#888888"><br>
-Carl<br>
<br>
</font></blockquote></div><br>