[racket] fruit flies

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Sep 13 04:03:18 EDT 2011

On Mon, Sep 12, 2011 at 10:38 PM, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
> Time isn't the only measure.  And in terms of space, I don't think
> you're accounting for all of it.

I don't think either of us is actually accounting for anything, actually.

> When you make universe scenes bigger, you tend to see GC pressure.
> This *suggests* to me that there is not a lot of sharing from one
> display to the next; rather, an entire WIDTHxHEIGHT bitmap is being
> generated (and thrown away) each time.  Yet I'm pretty certain this is
> not how the DOM works.  That means the space difference is much more
> than the space for representing the circles.

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).

> At least on laptops, increasing the size of the scene seems to induce
> more GC, and for large enough images the GC can actually induce a
> pause in an animation.  I'm pretty sure this is a qualitative
> difference between the two models.

I think you should measure.

A 2htdp/image is just a tree where overlays (and things like that) are
interior nodes and leaf nodes are things like circles.

Robby



Posted on the users mailing list.