Why I rebuilt Typst preview for Typsastra

Hi everyone,

I wrote an article about how Typsastra evolved from a complex-script-focused editor into an environment capable of previewing very long Typst documents.

The article covers:

  • why I moved from a full-document SVG preview to a virtualized PDF preview;
  • the memory problems I observed while testing documents with hundreds of pages;
  • bounded canvas rendering and motion-aware scheduling;
  • preserving forward and inverse synchronization in large, multi-file projects;
  • testing source files with around 20,000 lines and PDFs reaching approximately 1,500 pages;
  • why I consider performance and support for modest hardware part of accessibility.

This is not intended as a universal benchmark or criticism of Tinymist’s preview. SVG preview provides excellent responsiveness and partial updates. Typsastra simply makes a different trade-off: accepting a small refresh delay in exchange for predictable memory use on very large documents.

You can read the full article here:

I would be interested to hear how others work with long Typst documents, what preview limitations they encounter, and whether anyone has reproducible stress-test projects that could help improve Typsastra further.

5 Likes

I tend to be old school with large documents. I break them up into a main file and individual chapter files and edit these individually, usually on the command line with the stock vi editor.

In a separate terminal I have typst watch the main file. Any syntax errors show up in that terminal widow.

I keep the PDF open in Document Viewer.

My machine is beefy with lots of RAM so memory pressure is not an issue.

But being old school is just my fallback. I do follow developments in proper GUI Typst editors as they have the benefit of smart auto-completion, typically via Tinymist. This saves a lot of time because when editing with vi , and I see an error message in the watch window, I then have to search the Typst Documentation web site in Firefox to figure out why some syntax is wrong.