[racket] fruit flies

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Sep 13 08:11:45 EDT 2011

On Tue, Sep 13, 2011 at 5:53 AM, Stephen Bloch <bloch at adelphi.edu> wrote:
> On Sep 13, 2011, at 4:03 AM, Robby Findler wrote:
>> That would be a bug (if an entire width*height bitmap were being
>> re-created and thrown away each time and the program was just creating
>> a few circles instead of creating a bitmap of that size).
>> ...
>> A 2htdp/image is just a tree where overlays (and things like that) are
>> interior nodes and leaf nodes are things like circles.
> Right, but at some point it gets rendered to the (presumably pixel-map) graphics device.  IIRC, this is done by a function named "render" that returns a bitmap, and the resulting bitmap is then drawn on the screen, which would indeed mean that an entire width*height bitmap was being re-created and thrown away each time.

It isn't "thrown away" in the sense that a new one is allocated and an
old one is garbage collected.

But yes, eventually the same set of pixels have to be computed and drawn.


Posted on the users mailing list.