You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Problem
I am using hyperterm together with SSH and tmux in version 0.7.1 (0.7.1.36) . When using cat or docker logs <xyz>, hypterterm is extremely slow and then completely hangs. Hypterterm is then unusable.
As I can still attach to the existing tmux session with OSX's terminal or iterm2, I know for sure that the tmux session is okay. Hypterterm seems to have problems rendering large output files.
Can anyone else reproduce this or is this just me having this issue?
Some data:
Hyperterm version: 0.7.1 (0.7.1.36)
OSX version: 10.11.2 (15C50)
Reacted by Kyle Mathews, Dennis Roethig, Michael Rubanov, Jarmo Isotalo, Niklas Ingholt, Adam Seckel, Ben Evans, uetchy, James Munro, Fabian Schwarz-Fritz and 42 more
Can confirm ... using docker logs on a bigger rails app running migrations hangs HyperTerm completely for me. No issues with the native MacOSX terminal though.
I also get this hang issue when I push a lot of text at hyperterm. I use tmux and the underlying tmux session seems fine, I can open iTerm and connect just fine and everything still works. I just can't seem to type and get a response via hyperterm once it seems to lock up.
Same thing happens without tmux, just by displaying a file with very long content via cat. I noticed that memory usage goes towards my machine's maximum when the heavy slowdowns start (so that's probably why).
For macOS, looking at Terminal and iTerm, there is a notion of a scrollback buffer where you can limit the number of lines to which you can scroll back to view. Performance would likely increase if it only had to render the most-recent n lines rather than all of the lines.
I did a little test and ran both Hyper and Terminal.app with long outputs, mostly to test if it's the number of lines, rows, total characters that slow Hyper down, as welll as test different characters (i thought it may be parsing the output for highlighting or similar).
Results seem to indicate that it's mostly a function of total # of characters. But I'm pretty sure there's something fundamentally wrong, as i now have a Helper process using 15GB of RAM.
The times are surprisingly close to a linear relationship. Digging through a profile with Instruments didn't get me to anything specific, but it appeared as if there was an awful lot of of notification subscribing- and calling going on. I bet a strategically placed debounce would improve performance dramatically.
Reacted by Amar Sood, bitbrain, James Stine, Rahul Pilani, Albin Ekblom, Adam Crownoble, Aravind Reddy V, _ygor_gallina, Pavel Drankov, su21 and 4 more
I've investigated this a bit further. Doing a cat bigfile.manylines.txt creates a stream of about 1,000 actions per second:
I'm pretty sure these should be buffered to <= 60FPS as early as possible, but definitely before they hit the renderer. The following is a CPU profile captured with the developer tools.
In a CPU profile I created with the MacOS Activity Monitor, I also saw a lot of activity related to memory allocation/garbage collecting, which is possibly caused by runes as well since it creates an array on each call. But I'm unsure if that's already included in the Chrome profile.
Awesome work @MatthiasWinkelmann. I was just discussing with @nw that another performance win will be to bypass the Redux reducer (which creates a temporary Write object).
Instead, we can emit as part of a side effect, and then subscribe from the Term directly (pub/sub) style
I tried buffering in a couple different points in the write pipeline. But this iteration has been the most successful.
// call at most ~60 times per second to avoid overloading renderer, queue if overloadingconstrateLimitedDispatch=rateLimit(store_.dispatch,16);rpc.on('session data',({uid, data})=>{rateLimitedDispatch(sessionActions.addSessionData(uid,data));});
It's super simple, if the function isn't rate limited call it immediately otherwise queue up the function.
I tested this with cat largefile.txt, and it didn't lock up the ui for me (current release did). It takes a bit for the text to stream out when buffering so I'm not sure if this is good enough. Still more that could be done in terms of optimization.
@MatthiasWinkelmann would you be up for trying this again with this fork/branch?
As being said. hterm give us much more trouble to make performance improvement since we can't always monkey patch his rendering problem. Using xterm will give us much more availability and flexibility as the same time as being maintained on a more suitable base.
We do understand the need to have a better performance and we do take it seriously. And after the xterm switch. We will be able to do better performance improvement on the upcoming times.
Has there been any progress on this? I'm encountering this issue frequently and it's rather disruptive to my workflow. Looks like there hasn't been any motion in the xterm branch in about 2 months.
Reacted by Jan Matusz, Jürg Lehni, Jakub Kadlubiec and Fritz Lekschas
@insanityfarmxterm has been merged into our v2 branch. And this branch was renamed canary. You don't have to build Hyper from source anymore, to use xterm. You only have to set canary in your config as update channel.
Thank you for the information! I wasn't up to speed on the canary branch. Just updated and ran a quick test, and (so far) the issue seems to be resolved. Appreciate your help.
Reacted by CHaBou, Jürg Lehni, sundaycrafts and Erik Eng
@danielkalen I've just tested it with the current canary version, and the situation seems much improved.
The test above, with 10000x1000x🍷, which previously took 137 seconds is now done in 15 seconds, a 10-fold increase in performance.
iTerm does the same in 25 seconds, whereas Terminal.app is done almost instantly. So there's obvious room for improvement, but it's far less likely to actually interfere with work now.
iTerm does, however, better handle interruptions (control+c): it quits instantly, while Hyper finishes the output before handling the interruption. But that's tracked in #555, #1121, and #1484
Activity
dennisroethig commentedon Sep 3, 2016
Can confirm ... using docker logs on a bigger rails app running migrations hangs HyperTerm completely for me. No issues with the native MacOSX terminal though.
MrRio commentedon Sep 3, 2016
We may need to fork hterm and add some kind of buffering/caching
ppot commentedon Sep 3, 2016
@MrRio That would be a good idea. Mostly all my PR are for patching hterm lacking functionnality.
queso commentedon Sep 8, 2016
I also get this hang issue when I push a lot of text at hyperterm. I use tmux and the underlying tmux session seems fine, I can open iTerm and connect just fine and everything still works. I just can't seem to type and get a response via hyperterm once it seems to lock up.
hachre commentedon Sep 22, 2016
Same thing happens without tmux, just by displaying a file with very long content via cat. I noticed that memory usage goes towards my machine's maximum when the heavy slowdowns start (so that's probably why).
Related issue #571
webbm commentedon Dec 13, 2016
For macOS, looking at Terminal and iTerm, there is a notion of a
scrollback bufferwhere you can limit the number of lines to which you can scroll back to view. Performance would likely increase if it only had to render the most-recent n lines rather than all of the lines.KarlAmort commentedon Dec 20, 2016
I did a little test and ran both Hyper and Terminal.app with long outputs, mostly to test if it's the number of lines, rows, total characters that slow Hyper down, as welll as test different characters (i thought it may be parsing the output for highlighting or similar).
Results seem to indicate that it's mostly a function of total # of characters. But I'm pretty sure there's something fundamentally wrong, as i now have a Helper process using 15GB of RAM.
The times are surprisingly close to a linear relationship. Digging through a profile with Instruments didn't get me to anything specific, but it appeared as if there was an awful lot of of notification subscribing- and calling going on. I bet a strategically placed debounce would improve performance dramatically.
Also: Emojis count for 10 characters.
Tagging #94, #555, #881 and #1169 as probably identical issues.
rauchg commentedon Dec 21, 2016
Thanks a lot @MatthiasWinkelmann. This will certainly allow us to improve. CCing @dotcypress
KarlAmort commentedon Jan 9, 2017
I've investigated this a bit further. Doing a
cat bigfile.manylines.txtcreates a stream of about 1,000 actions per second:I'm pretty sure these should be buffered to <= 60FPS as early as possible, but definitely before they hit the renderer. The following is a CPU profile captured with the developer tools.
I tried to implement some sort of debouncing in https://github.com/zeit/hyper/blob/master/app/session.js#L56 but unfortunately couldn't get it to work reliably.
Another possibly easy performance win may be to switch the latter two terms in https://github.com/zeit/hyper/blob/1b6d925524f30148ead6c46326a0d47964d120b5/lib/hterm.js#L158: The
runes(text)takes 15 to 200 times as much time as the the regex incontainsNonLatinCodepoints(text)in a short test I did (35650ms vs. 150ms for one very long line, 45ms vs. 3ms for 10000 iterations on a 20-char string). As can be seen in the CPU profile it represents about half of the CPU time of echoing text to the terminal.In a CPU profile I created with the MacOS Activity Monitor, I also saw a lot of activity related to memory allocation/garbage collecting, which is possibly caused by
runesas well since it creates an array on each call. But I'm unsure if that's already included in the Chrome profile.Probable duplicates of this are #474 #1040, #1044, #571, #574 , #1237, #1221 as well the ones tagged two messages up, and possibly #1157 cc @dotcypress
rauchg commentedon Jan 9, 2017
Awesome work @MatthiasWinkelmann. I was just discussing with @nw that another performance win will be to bypass the Redux reducer (which creates a temporary
Writeobject).Instead, we can emit as part of a side effect, and then subscribe from the
Termdirectly (pub/sub) stylerauchg commentedon Jan 9, 2017
Also copying @hharnisc who was looking at the debouncing problem
hharnisc commentedon Jan 10, 2017
Thanks for the heads up on this thread @rauchg, digging into some
htermsource code this evening 🙇hharnisc commentedon Jan 10, 2017
I tried buffering in a couple different points in the write pipeline. But this iteration has been the most successful.
It's super simple, if the function isn't rate limited call it immediately otherwise queue up the function.
I tested this with
cat largefile.txt, and it didn't lock up the ui for me (current release did). It takes a bit for the text to stream out when buffering so I'm not sure if this is good enough. Still more that could be done in terms of optimization.@MatthiasWinkelmann would you be up for trying this again with this fork/branch?
https://github.com/hharnisc/hyper/tree/buffer-session-data
21 remaining items
ppot commentedon Aug 15, 2017
As being said.
htermgive us much more trouble to make performance improvement since we can't always monkey patch his rendering problem. Usingxtermwill give us much more availability and flexibility as the same time as being maintained on a more suitable base.We do understand the need to have a better performance and we do take it seriously. And after the
xtermswitch. We will be able to do better performance improvement on the upcoming times.insanityfarm commentedon Nov 2, 2017
Has there been any progress on this? I'm encountering this issue frequently and it's rather disruptive to my workflow. Looks like there hasn't been any motion in the xterm branch in about 2 months.
philippbosch commentedon Nov 2, 2017
@insanityfarm I haven‘t run into this issue anymore with v2 which afaik uses xterm now.
chabou commentedon Nov 2, 2017
@insanityfarm
xtermhas been merged into ourv2branch. And this branch was renamedcanary. You don't have to build Hyper from source anymore, to usexterm. You only have to setcanaryin your config as update channel.insanityfarm commentedon Nov 2, 2017
Thank you for the information! I wasn't up to speed on the
canarybranch. Just updated and ran a quick test, and (so far) the issue seems to be resolved. Appreciate your help.cesarferreira commentedon Mar 4, 2018
Hi guys, this issue is still present in
1.4.8dennisroethig commentedon Mar 4, 2018
@cesarferreira see #687 (comment) above - you should be able to switch to the canary version ... using it without major issue since a while
cesarferreira commentedon Mar 5, 2018
Thanks for the reply @dennisroethig , how do I change to the canary version? there is no reference to stable version or something similar in my config
chabou commentedon Mar 5, 2018
You can find instructions here: https://zeit.co/blog/canary#hyper
danielkalen commentedon Aug 28, 2018
This is an ongoing issue even in v2.0-2.1...
KarlAmort commentedon Sep 1, 2018
@danielkalen I've just tested it with the current canary version, and the situation seems much improved.
The test above, with 10000x1000x🍷, which previously took 137 seconds is now done in 15 seconds, a 10-fold increase in performance.
iTerm does the same in 25 seconds, whereas Terminal.app is done almost instantly. So there's obvious room for improvement, but it's far less likely to actually interfere with work now.
iTerm does, however, better handle interruptions (control+c): it quits instantly, while Hyper finishes the output before handling the interruption. But that's tracked in #555, #1121, and #1484
danielkalen commentedon Sep 1, 2018
@MatthiasWinkelmann #2449 (comment)
Take a look at the gif I posted comparing terminal
And hyper. This was running on 2.1.0 canary
fabianschwarzfritz commentedon Jan 4, 2019
I opened this issue and it's still an ongoing issue for me. Am I right in the assumption that this is now tracked in #2449 ?
I don't know why this was closed and is now tracked in another issue, but so be it.
mabdelfattah commentedon Jan 9, 2019
I have the same problem with Docker log on latest canary
