Skip to content
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

Debounce Input Event #155

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

Debounce Input Event #155

Enter-tainer opened this issue Oct 24, 2023 · 8 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!

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

No branches or pull requests

3 participants