Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increasingly long pauses as animation progresses #1

Open
eeshugerman opened this issue Feb 16, 2022 · 0 comments
Open

Increasingly long pauses as animation progresses #1

eeshugerman opened this issue Feb 16, 2022 · 0 comments

Comments

@eeshugerman
Copy link
Owner

These are garbage collection pauses. Surprisingly, the issue seems to be in (chickadee graphics path) or a dependency -- it's observable in this minimal example:

;; $ chickadee play gc-issue.scm
;;
;; Observation: 'gc-time slowly but steadily grows
;;
;; Notes:
;; - this example is based on chickadee/examples/path.scm
;; - only happens when game window is visible
;; - seems to be specific to (chickadee graphics path), doesn't
;;   affect (chickadee graphics font) for example
;; - observed with past few chickadee versions (though this
;;   example requires v0.8 because it uses `chickadee play`)

(use-modules
 (chickadee)
 (chickadee math vector)
 (chickadee graphics path))

(define canvas (make-empty-canvas))

(define max-gc-time 0)

(define (draw alpha)
  (let ((gc-time (assoc-ref (gc-stats) 'gc-time-taken)))
    (when (> gc-time max-gc-time)
      (set! max-gc-time gc-time)
      (pk 'gc-time gc-time)))

  ;; based on chickadee/examples/path.scm
  (set-canvas-painter! canvas (fill (circle (vec2 100 100) 5)))
  (draw-canvas canvas))

(run-game #:draw draw)

I emailed the developer, but got no response.

It would be nice to see if this is reproducible on another system (ie not anarchy-xps).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant