Skip to content

Improve screen repaint speed - #45

Open
malcomvetter wants to merge 1 commit into
tonerdo:masterfrom
malcomvetter:master
Open

Improve screen repaint speed#45
malcomvetter wants to merge 1 commit into
tonerdo:masterfrom
malcomvetter:master

Conversation

@malcomvetter

Copy link
Copy Markdown

Ideally, I'd like to see conversion to Generic Lists over arrays everywhere, but these mods made this library much easier to integrate into one of my other projects.

The other issue is that by keeping track of the cursor pointer and changing one char at a time, it's slow and the repaint factor is frustrating for a user used to the native GNU tools on *nix. I modified the logic to cut to the chase and quickly repaint the affected text whole strings at a time instead of per char.

Neat project overall-- thanks for sharing. I hope these changes are helpful to your goals.

@tonerdo

tonerdo commented Jul 9, 2018

Copy link
Copy Markdown
Owner

@malcomvetter thanks for the PR. Can you please look into the test failures? I'll also appreciate some data on how much your changes improve repaint speed

@cobbr

cobbr commented Sep 6, 2018

Copy link
Copy Markdown

Hey @tonerdo, I haven't tried out @malcomvetter's changes, but I have been noticing some screen re-paint issues for tab completion in a project I'm working on that uses your readline library.

I think the issue stems from the fact that when tabbing through options, they are erased one character at a time. It's not always an issue, but I've noticed it particularly when I'm using my application over an SSH connection.

I think erasing the string all at once while tabbing through options would make a big difference. Anyway, thanks for the awesome project, I've been getting a ton of usage out of it!

@malcomvetter

malcomvetter commented Sep 6, 2018 via email

Copy link
Copy Markdown
Author

@cobbr

cobbr commented Sep 6, 2018

Copy link
Copy Markdown

@malcomvetter Yeah, I am hoping it will get merged for easy nuget restore :)

@Latency

Latency commented Sep 10, 2018

Copy link
Copy Markdown

Open a PR and make sure it doesn't fail like I am seeing currently. Test it out.. if it works better than the previous ReadLine build, it should be good to go.

@loudenvier

Copy link
Copy Markdown

This PR breaks multiline editing in many ways. There was a reason the original code "moved char by char". To migrate it to move "faster" the "rendering" code must be a lot more clever. For example: when moving left this PR tests if the cursor is at the "prompt" length and prevent it from going further. This only works on the first line.

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.

5 participants