-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Typing latency #296
Comments
I don't see that latency here 😰 |
Neither do I. @indutny can you record a video with your mobile phone? |
there are tools to objective latency measurement |
Just wrote a small C application to measure latency. Turns out HyperTerm is actually faster than iTerm2. My bad! Still would be cool if anyone else would be able to confirm it independently. I am not absolutely sure that my tool is correct. (The tool is here) |
Though, may be HyperTerm just became faster since last time? :) Have you done anything about performance? |
Can you publish that C app here at GitHub? I'm interested in how it works 😊 |
@matheuss I already did in a comment above. Here it is just in case: https://gist.github.com/indutny/b530593a996bbbe8bfd51fc3f38c45f2 |
Oh, my bad 😅 Thanks! |
My observations (subjective) are that HyperTerm has noticeably less latency as I type than iTerm2 but in my case I know a lot of that is due to my zsh config which causes a lot of redrawing as I type.
There have been a couple of updates of |
There are certainly some actions at which HyperTerm can be slow. Typing in a new prompt is certainly not one of them (as shown above :P), but we have to consider a lot of different scenarios (like large screen redraws). |
This must be it. I wish I had an old version to compare to. |
Decided to publish my tool as a separate repo with build instructions (OS X only): https://github.com/indutny/latetyper |
You can find the old versions here ^~^ |
Incredible @indutny |
@matheuss just tested old versions, all of them seems to be faster than the latest iTerm2 :( |
Good job HyperTerm, though! |
So it comes down to our measurement approach here. The approach. I chose here is "when can I see the letters after hitting a button on my keyboard". If we drop down into devtools and look at things per each frame we can get a better look at exactly when the new chars are shipped to the user. ^ We can see the majority of our frames are shipped to the user well under budget. Since the update loop for the screen is running inside of a requestAnimationFrame we are kinda self limiting how fast we are updating the screen (this is good, and bad in someways -- if we are trying to optimize for shipping the chars to screen as fast as possible) I will be looking more into the costs associated with typing and some easy wins that we can get. More on this later ✌️ |
Nice @samccone, |
I've noticed some "perceived" latency when using the backspace key—that is, when typing, it seems pretty performant. When using backspace/delete, I've noticed that there's a small time difference between when the character goes away and when the cursor moves to the previous position. I don't know if this is what @indutny was talking about (it may have been typoing in both directions). If so, we can probably do some work to move the cursor faster to where it should be. |
This is due to how hterm implements the cursor update :) I would say this is WAI :) |
Interesting...thanks @samccone. Probably some room for improvement there 😄 |
I'm seeing the behavior described by @mike-engel as well. I frankly can't tell the latency difference between iterm and hyperterm, but that deletion latency is really visible. |
@chenglou do you observe "latency" in the char being deleted or the cursor moving? |
^ 😄 -- this could be fixed upstream |
I can confirm seeing the delay between character input and cursor movement as well. Unfortunately it is enough to make typing in HyperTerm an uncomfortable experience. EDIT: Things seems to have changed for the better in builds of latest master, perhaps as a side-effect of another update since there was no mention here. The delay is far less pronounced and the improvement clearly visible on a slowed down recording. |
I'm not sure if this belongs here or if I should open another issue, but: If I am using render heavy commandline apps, e.g. midnight commander. I can recognize a very heavy latency of half a second with every input. This make it unusable. You can reproduce this with installing midnight commander and just try to navigate with the arrow keys. |
@reicheltp can you record a timeline please right click and save and then share a link to it on https://chromedevtools.github.io/timeline-viewer/ thanks |
@reicheltp very interesting! I'd love to reproduce it as well. Can you tell me exactly what programs you open and in what order? |
@samccone Here a short timeline: The first long frame is, when I opened the midnight commander with @rauchg I have used Midnight Commander for Windows (Get it here https://sourceforge.net/projects/mcwin32/) or the OSX/Linux version here (https://www.midnight-commander.org/) My Setup is Windows 10 Enterprise x64 with latest Hyper.app. Tried with powershell and cmd. |
@reicheltp is it still a valid issue? Can you reproduce with v1.3.1? |
@chabou Although I can notice a slightly performance improvement with v1.3.1, the issue still exists. |
I've just installed Hyper a while ago, and while I don't have any concrete data to back this up, I can definitely feel the typing delay. |
Without plugin? What OS/Hardware? @simoncpu I can't feel it on my Macbook Pro 2017 running High Sierra, but that could be that my computer is overpowered 👍 |
@albinekb Yes, without plugin. OS is Windows 10 Pro, hardware is Thinkpad P51. I currently settled for wsltty because Bash on Windows works out of the box (I previously used ConEmu, but had problems with the colors). BTW, I've just tried Hyper right now (normal command prompt, not bash), and there's a few milliseconds of delay between pressing the keyboard and displaying the characters on the screen. It's not a deal breaker, and I think most people won't notice it, but the experience is akin to typing commands in an SSH session. |
Thanks for that @simoncpu, we're currently working on replacing the terminal rendering lib to xterm.js, which will give better results. After that there's lots more we can optimize to make it faster! 🎉 |
I think I can feel (sorry, no hard data, just gut feel hehe) less lag when I right clicked on the Hyper icon and chose: Run with graphic processor > Integrated graphics The default is "High performance NVIDIA processor", although I think I recall having less lag when I used Hyper without an external monitor using the default settings a while ago. Electron issue with NVIDIA, maybe? |
Hi, |
Hi all, I had experienced lags and high CPU usage on Windows 10 as well and it was resolved by adding |
I have tried what was posted above.. this never happened until I updated to 2.0. Does anyone else have some ideas as to what causes this latency? I don't wanna use cmd. |
@AustinTruex68 are you on Windows? Maybe you have same problem than #2838? |
@freebroccolo Can you elaborate more on the zsh issue? I am experiencing latency as well and want to figure it out. |
I'm on windows and I was also having a lot of latency issues with it. I was using with Gitbash (MINGW64) and if I opened up a new window and used cd, mkdir, ls etc. it was totally fine. However when I opened up node apps using inquirer, cl-table, etc. It would be so bad that scrolling would be impossible and there would be a 1 second lag typing in the prompts. I'm really sad because I had a theme that matched my vscode which I really liked. Oh well. |
Here to confirm that it was the 'hyperline' plugin for me as well. Disabling the plugin fixes the issue outright |
Is there any way to reduce latency when typing things? It is not super slow, but noticeably slower than any other terminal that I use.
It feels like I'm typing on ssh terminal.
The text was updated successfully, but these errors were encountered: