-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Playground: slow on Safari #282
Comments
There's already a debounce function. The debounce time is determined dynamically as follows: var elapsedTime = endTime - startTime;
debounceMs = elapsedTime * 8; The factor could be increased, but it doesn't feel laggy to me. |
Ah, I should have checked other browsers:
|
Interesting. I use it with Safari on M1 mac and have no issues. |
You can try editing the code locally and changing that 8 to a higher number? |
Also try with a large file and make sure the debounce is kicking in. When I try it with 240K file, I see exactly the behavior you're requesting -- I type and then when I stop, it renders. That's because the debounce time is determined dynamically based on how long it takes to parse and render the document. |
Currently, typing is slowed down. Does the code parse and render after every keystroke?
If yes then you could wait until the user pauses typing – e.g., like this:
The text was updated successfully, but these errors were encountered: