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

Optimize typing a single character #1233

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Janpot
Copy link

@Janpot Janpot commented Sep 17, 2024

What:

This improves performance of typing a single character by ~2x

Why:

Users complain about performance #577. Also related to this thread

How:

The desired behavior is to (I suppose) yield to the next macrotask in between keyboard actions. We can avoid the initial wait. Some quick benchmarking suggested those wait calls make up the bulk of the runtime of this function. When there is only 1 action to run, this brings the wait calls from 2 => 1

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

I don't believe documentation/tests would be required here.

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

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

Successfully merging this pull request may close these issues.

1 participant