cider icon indicating copy to clipboard operation
cider copied to clipboard

Even small projects take extremely long to load/export and consume multiple GB of RAM

Open jonborchardt opened this issue 3 months ago • 3 comments

Summary
Even small projects are slow to open and export, with memory usage ballooning to multiple GB.

Steps to Reproduce

  1. Open a small project with a few dozen cards and minimal assets.
  2. Trigger export.
  3. Observe load/export duration and system memory usage.

Expected

  • Small projects load in seconds and export quickly.
  • Memory usage remains bounded.

Actual

  • Long load/export times.
  • Memory usage grows to multiple GB.

Acceptance Criteria

  • Export time for a representative small project reduced to a reasonable baseline.
  • Peak memory usage reduced significantly.
  • Add performance guardrail tests (time + memory budget).

jonborchardt avatar Sep 23 '25 03:09 jonborchardt

This seems to be related to cider issue #137. I tried removing my fonts, and that helped on a small project. But with hundreds of cards, performance is still painfully slow.

jonborchardt avatar Sep 23 '25 16:09 jonborchardt

Added font import and global project-wide configuration in 0.5.5. Font imports are now handled in the global-styles.css file at the root of every project.

I'll leave this open until memory usage can be profiled. The initial take on that is that during the export, every card and then every export sheet is converted into an image and with 300 dpi (for professional printing) by default (at US-letter size) each sheet is two 2550 x 3300 images (front and back). These sheets are then embedded into a pdf file (doubling the memory usage during the pdf generation). By nature of the export, high memory utilization is expected, but some profiling could help to catch any optimization opportunities.

hristoiankov avatar Oct 21 '25 12:10 hristoiankov

I would call it complete now

jonborchardt avatar Oct 21 '25 14:10 jonborchardt