[plt-scheme] frtime slowing down

From: Gregory Cooper (greg at cs.brown.edu)
Date: Sat Mar 22 13:37:17 EDT 2008

Hi Dave,

I'm attaching a diff for v372, which you should be able to apply by
going into collects/frtime and running:

patch -p0 <ftfix372.diff

At some point you'll probably want to upgrade to v4, since it has
quite a few improvements over 372.

Let me know if this doesn't work.

Cheers,
Greg

On Sat, Mar 22, 2008 at 5:11 AM, Dave Griffiths <dave at pawfal.org> wrote:
> Thanks! - is there a way I can retrofit the fix into 372, or will it be
>  best for me to upgrade to v4?
>
>
>
>  On Fri, 2008-03-21 at 23:19 -0400, Gregory Cooper wrote:
>  > 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
>  > >
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ftfix372.diff
Type: application/octet-stream
Size: 5068 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20080322/12a6323f/attachment.obj>

Posted on the users mailing list.