-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache compiled document #503
Comments
In the web app, it would be easier to do than locally because we can in theory save & restore a full memory snapshot, but it would use prohibitive amounts of storage. |
A very fair criticism, for which I also do not see an easy way around. Would storing the state be a better option, so that the first compile is still a warm compile, perhaps? |
Storing which state? |
(Preface: I'm not overly familiar with Typst's internals) I thought that Typst keeps a store between compiles so that small changes lead to small compile times (incremental). Saving this when ending a session and restoring it when starting a new session, could be used to avoid a cold compile. |
Unless you have exceptionally fast storage and an exceptionally demanding document, compiling cold will be faster than compiling warm from a memory snapshot. Not to mention the gigabytes of storage required. |
It does, but it's very hard to serialize this into bytes (it's full of pointers and in-memory data structures). Hence why storing a full memory snapshot is the only simple way. But either way, it'd be very large. |
Description
Large documents, when first opened, can take a long amount of time to compile. It can be detrimental to motivation (ikr) to wait for the preview of a document you haven't even started to change yet. Could the final compile be cached somehow?
Use Case
Provides an immediate render of the document so you can more easily jump into editing. Perhaps this feature can be conditional on the time previously taken to compile?
The text was updated successfully, but these errors were encountered: