-
Notifications
You must be signed in to change notification settings - Fork 18
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
Pasting large blocks of characters into the interactive interface #46
Comments
Yes, there is a noticeable delay when pasting even reasonable amounts of text, such as a few hundred characters. I'm looking into how this can be addressed.
Is this is a typo? I'm not sure what you're trying to say. |
Sorry, 1.5w characters means 15 thousand characters
|
I've improved the performance a bit by not re-acquiring the write lock for each character input. When compiled in release mode, the demo can handle a paste of 15,000
One solution to this problem is to cache the current line/column position of the cursor, but keeping that cached value correct with all the various cursor movement and text manipulation commands supported by I'll give the problem some thought and try a few things and let you know what I come up with. |
So cool, although the problem persists in debug mode, the efficiency in release mode is already acceptable. I look forward to even better optimization, by the wey, the confirmation of the position of the cursor does have some minor problems. |
Problems with performance when pasting large blocks of characters in the interactive interface.
For example, copy 1.5w characters into the interactive interface, it takes more than one minute to complete, and during this time, the program will occupy a 100% CPU usage. But in a terminal such as bash/zsh/fish, it can be completed within seconds.
This phenomenon is easy to reproduce, I think it should be a bit of a problem reading part. . I need some help,is there any problem with my use?
The text was updated successfully, but these errors were encountered: