[plt-scheme] 2htdp/image questions

From: engineer at alum.mit.edu (engineer at alum.mit.edu)
Date: Thu Apr 22 10:39:40 EDT 2010

Attached is an example that shows some poor performance.

The animation has four ways to render the background:
1. Use a blank rectangle
2. Use place-image to create a complex image which is recreated from scratch
each time render is called
3. Create an image like in #2 but store it as a constant before the
animation starts.  Render then references this constant as the background
scene for the animation each time.
4. Use a constant hi-res photo as the background.

I found that #1 and #4 run okay, but #2 and #3 show choppy animation of the
foreground.

I pulled my hi-res photo out of the code to make the file more attachment
friendly.

Thanks,
Paul

Paul R. Ojanen
Math/Physics/Computer Science Instructor
Technology Director
The Academy at King
5825 Old Jonesboro Rd
Bristol, TN 37620

> -----Original Message-----
> From: plt-scheme-bounces at list.cs.brown.edu [mailto:plt-scheme-
> bounces at list.cs.brown.edu] On Behalf Of Robby Findler
> Sent: Thursday, April 22, 2010 8:28 AM
> To: Noel Welsh
> Cc: plt-scheme at list.cs.brown.edu
> Subject: Re: [plt-scheme] 2htdp/image questions
> 
> > On Wed, Apr 21, 2010 at 3:33 AM, Stephen Bloch <sbloch at adelphi.edu>
> wrote:
> >> But why do I (or my students) have to go through a feature-request
> process
> >> to get additional operations, rather than having an easy way to write
> them
> >> ourselves?
> 
> One possible answer: you don't. Make a copy of the 2htdp/image and go
> wild. Put it on planet if you think I'm so unresponsive that I won't
> even accept patches.
> 
> One possible other answer: asking for an easy way to add features to
> library is in fact a feature. :)
> 
> That said, I do plan to do more with 2htdp/image. I just don't expect
> I'll have time for a few months. I welcome your experimentation in
> that time; lots of the work is figuring out exactly what to do, often
> that's easier than doing it, once the "what" is settled.
> 
> As for a recent comment here, I don't think that we want to add a
> "rasterize" or "make this be a bitmap" operation to 2htdp/image since
> that brings in a performance model to teach to the students, at least
> without exploring other alternatives. I have not had a chance to look
> into the specific performance problem that was mentioned here earlier,
> but but I would hope that there is a better solution than making the
> students do extra work.
> 
> Speaking of which, if someone has a badly performing program, please
> do share it so I can investigate more effectively.
> 
> Thanks,
> Robby
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
-------------- next part --------------
A non-text attachment was scrubbed...
Name: animation slowdown.ss
Type: application/octet-stream
Size: 2592 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20100422/a8221ddb/attachment.obj>

Posted on the users mailing list.