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

[clipboard-] speed up setcol-clipboard and make it async #2372

Merged
merged 2 commits into from May 17, 2024

Conversation

midichef
Copy link
Contributor

@midichef midichef commented Apr 5, 2024

setcol-clipboard is very slow for large numbers of rows. It also freezes the display while it runs.

To see the slowness: do seq 1000111 |vd - then paste a column of a million rows via gs gzy za newcol gzp. On my system it processes a few thousand rows per second.

This PR makes setcol-clipboard about 100x faster. It also adds the @asyncthread decorator to setValuesTyped() (like setValues()) so the screen can continue to update while setValuesTyped() runs.

Copy link
Owner

@saulpw saulpw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised that this is a 100x speedup, but it does simplify the code, and there's already the cycle() in setValuesTyped. Thanks for finding/fixing it.

@anjakefala anjakefala merged commit 43347b6 into saulpw:develop May 17, 2024
5 of 13 checks passed
@midichef midichef deleted the setcol_clipboard_speed branch May 17, 2024 04:10
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.

None yet

3 participants