[plt-scheme] frtime slowing down

From: Gregory Cooper (greg at cs.brown.edu)
Date: Fri Mar 21 23:19:53 EDT 2008

Hi Dave,

This was a bug.  Thanks for pointing me at it; it should be fixed in
svn now.  Let me know if you still encounter any such problems.

Greg

On Fri, Mar 21, 2008 at 7:49 PM, Dave Griffiths <dave at pawfal.org> wrote:
> Hi Greg, all,
>
>  Why does the following code slowly use more and more cpu? I'm assuming
>  that although visually the circles are being removed, something remains
>  which is getting processed.
>
>  (require (lib "animation.ss" "frtime"))
>
>  (define (metro tick)
>   (let ((tick (floor (* tick 1000))))
>     (when-e (> (modulo (floor milliseconds) tick) (/ tick 2)))))
>
>  (define (truncate-list lst count)
>   (cond
>     ((zero? count) '())
>     ((null? lst) '())
>     (else (cons (car lst) (truncate-list (cdr lst) (- count 1))))))
>
>  (display-shapes
>   (list
>   (collect-b
>    (metro 0.1) '()
>    (lambda (e lst)
>      (cons (make-circle (make-posn 50 (+ 50 (integral 0.2))) 10 "red")
>            (truncate-list lst 4))))))
>
>  cheers,
>
>  dave
>
>  _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.