Skip to content

ManimView: cache converted SwiftUI Paths across frames #8

Description

@ronaldmannak

ManimView (PR #5) rebuilds every mobject's SwiftUI Path from its BezierPath on each Canvas frame. This is fine at Phase 1 scale (tens of mobjects, 8-segment circles), but for large scenes the conversion could be cached: a mobject's world path only changes while an entry that owns its geometry (transform) or transform is active, so per-entry-window caching (or caching keyed on the mobject's snapshot hash) would eliminate most per-frame work.

Do this only when profiling shows it matters — the cache invalidation is where the bugs live.

Deferred from PR #5 to keep the initial renderer straightforward and obviously correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions