typst / webapp-issues

Issue tracker for Typst's web app.
https://typst.app
9 stars 0 forks source link

Unclosed delimiters in long texts tank performance #360

Open genericusername3 opened 1 month ago

genericusername3 commented 1 month ago

Description

Opening but not (yet) closing a delimiter before a long text absolutely wrecks performance of the web app, so much so that you can't really close the delimiter anymore. For instance:

#{

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
et dolore [...]

inserts an "unclosed delimiter" error at every word break. Doing this in a long document (linked as reproduction project) is near-catastrophic.

I'm not sure whether this should also be a compiler issue because the reporting of every token boundary as an error is what the compiler does and not the fault of the webapp (opened issue: #4272)

Reproduction URL

https://typst.app/project/rrW6lbG904CYvmMHuwJDKj

Browsers

Firefox, Chrome

OS

Windows, Linux