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

Noticeable blinking while typing #10

Closed
cyangle opened this issue Oct 15, 2022 · 3 comments
Closed

Noticeable blinking while typing #10

cyangle opened this issue Oct 15, 2022 · 3 comments

Comments

@cyangle
Copy link

cyangle commented Oct 15, 2022

I'm not sure if it's related to my setup or not.

I was connecting to a remote dev container with vscode and there's noticeable blinking using ic with vscode terminal. But I don't have this problem with the crystal repl.

Screen.Recording.2022-10-14.at.11.14.21.PM.mov
@I3oris
Copy link
Owner

I3oris commented Oct 15, 2022

Hello @cyangle, thank you reporting this!

Do you reproduce on a classical terminal emulator? I guess It too slow on the vscode terminal.
If you haven't already done it, you can try to build IC in release mode.

Maybe the --no-color could be a work around?

@cyangle
Copy link
Author

cyangle commented Oct 15, 2022

It seems like a vscode problem. I turned on the local echo flag of the integrated terminal and it helps a lot.

Or maybe it's affected by project size.

I was trying ic with https://github.com/cyangle/stripe

Here's the cr file:
bin/console.cr

require "../src/stripe.cr"

Stripe.configure do |config|
  config.access_token = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
end

Stripe::ApiClient.default.default_headers["Stripe-Version"] = "2022-08-01"

api = Stripe::InvoiceitemsApi.new

il = api.get_invoiceitems

debugger

pp il

@I3oris
Copy link
Owner

I3oris commented Oct 25, 2022

On this commit, I've done several things that help to reduce blinking. Before, when typing a character, the screen was cleared up to the prompt, then some computations was done like re-highlight the expression, replace the cursor, then the expression was printed. Now the computations are done prior clearing the screen so the time between cleared screen and printed screen is extremely short. In addition (because seldom blinking was still present after that), I disallowed IO synchronization during the update, which almost killed the blinking on my side.

As soon I will release a new version of REPLy you would be able to see the changes in IC.

@cyangle cyangle closed this as completed Jan 12, 2023
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

No branches or pull requests

2 participants