typst-py icon indicating copy to clipboard operation
typst-py copied to clipboard

Limit extensive usage of a memory

Open practicalrs opened this issue 8 months ago • 1 comments

Hi,

We are using a Typst integration in our project and we are following your integration as a reference integration.

We are investigating a possible memory leak in Typst crates or integration and we've found that extensive memory usage is limited when we do

comemo::evict(0);

after invoking typst::compile().

In case of your integration, it would be after this line https://github.com/messense/typst-py/blob/main/src/compiler.rs#L24

We noticed this problem because we have an use cases to generate reports with tables that have hundreds of pages.

Best regards, Michal

practicalrs avatar May 06 '25 10:05 practicalrs

PR welcome!

messense avatar May 22 '25 01:05 messense