+
Skip to content

Increasingly long pauses as animation progresses #1

@eeshugerman

Description

@eeshugerman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载