<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On Oct 31, 2010, at 10:24 AM, Robby Findler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Overall, tho, we'd like to be able to support this kind of thing, but</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">we need to do a better job. As I'm writing this, I wonder if we could</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">exploit the sharing in the image. In your example, there are only 11</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">calls to 'square' that turn into those 42,000 different squares spread</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">around. If we could detect and exploit the sharing somehow that could</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">lead to a big speed up. (But this is just a half-formed thought;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">nothing may come of it.)</div></blockquote><div><br></div>The "cache-bitmap" tweak I suggested might provide this.</div><div> (local [(define sub (cache-bitmap (carpet (/ size 3) c))) ...]</div><div> (overlay (square size "outline" c)</div><div> (above (beside sub sub sub)</div><div> (beside sub ctr sub)</div><div> (beside sub sub sub))))</div><div>After "sub" is rendered for the first time, its bitmap will be cached, then used seven more times.</div><div><br></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div>Stephen Bloch</div><div><a href="mailto:sbloch@adelphi.edu">sbloch@adelphi.edu</a></div><div><br class="webkit-block-placeholder"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>