-
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
Change to xterm.js #1275
Comments
When I first tested it it had some serious problems in terms of support of terminal features and slower performance. Would be useful to revisit this now, though |
Agree, would actually be good to have some reproducible test cases to compare both against each other. Like the |
It also may fix #270. |
Actually it won't, it has no support for cursor shapes at all. It would be a lot easier to fix #270 though. |
@mofux I recently generated the stats at #687 (comment). It's a really somewhat terrible ruby script but I could put it in a gist if you're interested. It's actually a bit involved to measure output lag (from the outside) because the actual commands finish long before the output arrives. |
|
FYI, the main issues on xterm.js to watch regarding perf are:
It might be worth holding out on migrating until these 2 are tackled if the laggy input is too much of a regression (likely some time in January of February). |
I say we wait then. We finally have a good looking terminal on Windows, I'd be sad if it turns laggy :( |
I agree. Thanks @Tyriar for giving us a rough roadmap. I'll follow the issues closely and catch up again once they have been resolved. |
+1 for switching to xterm.js. As an Asian user, I would be very happy to see correctly rendered CJK characters and support for IME, as for now they mess up any other output in hyper. |
@dionisokan can you describe the issues you have with the IME support in 1.0? cc @matheuss |
@rauchg I have uploaded two GIFs (iTerm 2 & Hyper 1.0) depicting Chinese IME usage under iTerm 2 and Hyper 1.0, with the same font configuration in both terminal emulators. |
So helpful @dionisokan, thank you |
I made another test. Using Chinese locales, so GNU softwares on my Mac shows in Chinese if possible. My Would like to help if further testing is requested. |
The xterm.js performance issues should be fixed in the next release, see microsoft/vscode#17875 for what's done and what's left. We're targeting Feb 6 for v2.3.0. |
An interesting benchmark would be to see how it handles Currently, hyper becomes totally unusable for 10-20 seconds after running |
With the xtermjs/xterm.js#438 branch which is pending review, |
@avindra the question is whether that's a problem with the current RPC / redux dance, rather than hterm itself. |
We have some improvements coming in that front regardless, which will be good for hterm, xterm, or whatever we use in the future |
Update on xterm.js: The big performance issues have landed (excluding xtermjs/xterm.js#447) and I've started rewriting the parser to be more performant and better organized (xtermjs/xterm.js#462). After these changes xterm.js will no longer lock up when a program gives a large amount of output, and it will finish the command a lot faster (typically 300-500% faster depending on situation): Old (within vscode) ~11s: New ~2.5s: Note that the above does not have all the fixes included and it is also being hosted within VS Code which is quite heavy when compared to Hyper. Hyper currently acts similar (but worse) than the old xterm.js (see #94). These changes and the larger move towards TypeScript are also bringing us closer to separating rendering logic completely (necessary for #781 and microsoft/vscode#12000). |
@Tyriar we're working on debouncing the pty calls, I don't think the choking up is hterm's fault? |
@rauchg if by debouncing you're talking about sending XOFF and XON to the pty then fixing that would fix the lock up issue, it won't fix processing or rendering times though. The above doesn't actually include the XOFF/XON catch up support just yet (xtermjs/xterm.js#447), it's just that rendering isn't as taxing anymore. If you did add catch up via XOFF/XON, but did not improve rendering or parsing performance the commands will be smooth but take a very long time (because you're still doing all the same stuff, it's just spaced out more). Hope that made sense, I've been digging into this stuff a lot in the last 2 weeks 😄 |
Seems like they're not implemented in
|
@Tyriar I took another look at xterm.js the other day, but it'd be a regression for us in two fronts:
I tried those two with |
I'm very happy with the state of xterm.js right now. Wanted to give everyone heads-up on this thread that we are currently migrating to it. |
@rauchg is there a current PR we can follow for the migration? |
Looking forward to it, thank you! |
Is there a timeline for this issue? |
You can already use it. |
@chabou when on the canary channel how do you flip hyper over to xterm? |
@isseiler the canary update channel sets xterm as the default |
Close me, I'm done ✨ |
A long journey finally comes to an end |
@mofux Let's do this! |
@mofux So Hyper v2.0 use xterm.js? Also, what did it use before xterm.js? Did Zeit develop the terminal ui before xterm.js? |
@DRSDavidSoft before that we used |
@DRSDavidSoft Indeed the UI is developed since the start. We where using hterm but xterm is more promising and useful since we are in contact with actives maintainers and we can reduce bugs or isolate them more easily. |
@Tyriar does this mean it should be possible to use within VS Code ? |
No @cgatian, we now use the same library as in vs code do render the terminal, VS Code already have a built in terminal 👍 |
how we can integrate hype with internal vs code terminal. |
Hyper and vscode both use xterm.js to render the terminal, but apart from that they are two completely separate applications with different architectural designs. Both cannot be integrated into each other. But the good news is: contributing enhancements and addons to xterm.js will allow both to use them! The xterm.js crew is currently working on a plugin architecture that once landed will make it much easier for vscode and hyper to use addons written for xterm.js. |
Hi, after evaluating several JS libs for terminal emulation to improve the performance of hyper, I found that https://github.com/sourcelair/xterm.js would probably better suite this project.
It feels slightly less responsive at the moment, I think this is caused by the queue mechanism that tries to schedule big ui updates and introduces some ms lag - but it can be optimizedI did some quick tests replacing hterm with xterm.js and the performance seems level. I was also able to quick and dirty put in some of the features we get from hterm, e.g. changing the cursor color on bell.
If you like I can start working on pull request that replaces the current implementation with xterm.js, but I'd like to see some thumbs up for that first
The text was updated successfully, but these errors were encountered: