Skip to content

Bound figure extraction canvas memory and support cancellation #12

Description

@enu3379

Background

The vendored fig-extract engine keeps a scale-2.2 full-page canvas on every detected EngineFigure, and the viewer additionally creates preview image data. A figure-heavy paper can therefore retain hundreds of MB. In-flight scans also continue after the document changes.

Acceptance criteria

  • Full-page canvases are not retained for every figure-bearing page after previews are produced
  • Peak retained page render surfaces are bounded, aligned with the implementation plan's small LRU policy
  • Document replacement cancels or cooperatively stops the previous extraction
  • Preview Blob/Object URLs are revoked on document replacement and teardown
  • A long, figure-heavy PDF has a documented memory QA result
  • Engine changes are made in the upstream figure-preview-test source first, then vendored byte-identically with a version bump
  • npm run typecheck, npm test, and npm run build pass

Blocker

The documented upstream is https://github.com/onetwothr1/PDFViewer-Figure-Extract. The current GitHub account and local workspace cannot access it (gh repo view and git ls-remote both report that the repository was not found). Access to that source repository, or a new upstream engine release/commit from its owner, is required before changing the vendored file. AI-assisted.

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