Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Debounce Input Event #155

Open
Enter-tainer opened this issue Oct 24, 2023 · 9 comments
Open

Debounce Input Event #155

Enter-tainer opened this issue Oct 24, 2023 · 9 comments

Comments

@Enter-tainer
Copy link
Owner

reported by @Enivex on discord. typst-preview will use many CPU cores for some reason. We may add a config to debounce input rate.

@IllustratedMan-code
Copy link

Additionally, typst preview seems to block input (or at least there is more lag on input than normal).

@mainrs
Copy link

mainrs commented May 14, 2024

When typing fast, this also removes the benefit of typst to instantly compile changes. Often times I just watch my key strokes being added one by one inside the preview.

@Enter-tainer
Copy link
Owner Author

When typing fast, this also removes the benefit of typst to instantly compile changes. Often times I just watch my key strokes being added one by one inside the preview.

does your document take a long time to compile?

@mainrs
Copy link

mainrs commented May 14, 2024

When typing fast, this also removes the benefit of typst to instantly compile changes. Often times I just watch my key strokes being added one by one inside the preview.

does your document take a long time to compile?

Just using the normal typst compile command, no. It's instant. But I usually write my documents with the text file and the preview in split pane. And Everytime I time something, the preview is updated key stroke by key stroke. It lags.

@Enter-tainer
Copy link
Owner Author

When typing fast, this also removes the benefit of typst to instantly compile changes. Often times I just watch my key strokes being added one by one inside the preview.

does your document take a long time to compile?

Just using the normal typst compile command, no. It's instant. But I usually write my documents with the text file and the preview in split pane. And Everytime I time something, the preview is updated key stroke by key stroke. It lags.

can you post a screen record here? i wonder how it looks because i didnt experience such lags

@mainrs
Copy link

mainrs commented May 14, 2024

Screencast_14.05.2024_15.00.01.webm

Maybe it's package-related. I use polylux for the slides. And tablex, since I hide is bugged in the default table implementation. Therefore, the lines appear on slides even if I hide the table itself.

edit: I think it's tablex. It just is slow when rendering. The normal table is faster, but also kind of lags behind a little bit. In that case a debounce will fix this issue; the compilation will feel faster.

@Enter-tainer
Copy link
Owner Author

thank you for the recording!

about the packages, i remember the builtin table already covered most features of tablex(it is the tablex author himself reimplement the algorithm in rust!). i've also heard that touying is faster to compile than polylux but i havent tried yet.

about the performance: i'm designing a new architechture to improve the performance of the renderer. but recently i'm too busy to move on because of work.

@mainrs
Copy link

mainrs commented May 14, 2024

about the packages, i remember the builtin table already covered most features of tablex(it is the tablex author himself reimplement the algorithm in rust!).

Technically I do not need any feature that only tablex provides. It is just that, when hiding tables, the builtin table leaves the borders on the PDF page. It's already a known bug. That's why I used tablex, since that package does not exhibit that behavior.

I'll try touying for the next presentation!

@Myriad-Dreamin
Copy link
Collaborator

Myriad-Dreamin commented Jul 15, 2024

You can try this in typst-preview v0.11.15 or tinymist v0.11.15: Myriad-Dreamin/tinymist#408 and Myriad-Dreamin/tinymist#412

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

4 participants