-
Notifications
You must be signed in to change notification settings - Fork 336
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
Browser gets frozen when a command outputs too much data #81
Comments
Any input on this performance issue @chjj , thanks ? |
I've personally never run into this. I just tested it in my terminal (as a blessed widget, which could conceivably have even worse performance issues especially if the terminal is not full screen). I ran I've tried to optimize the browser renderer a number of times in the past. I always ended up scrapping it due to its complexity and headaches. I've never heard of it actually freezing though (the freezing might be a different issue, it should never freeze completely just because it takes a while to render something). |
@chjj i also believe the bug is not related to data stream size. Wherever, if i get it right, term.js remove all child html elements from the terminal element and writes new ones for every update. That is surely not the best approach. :-) Did you think about to have one |
@aurium Personally I think it would be better. |
try 'yes blah'. it will freeze, at least it did for my whole team and customers. In my implementation, i managed to hack it with a buffer, and a rate of data bursts, so that browser has only a few things to render at a time. when the buffers got filled, i had to remove the characters yet to be sent, and that sometimes distorts things for graphic heavy apps |
@sagarchandarana123 thanks to confirm this issue. Could you share your workaround source code ? |
When we type a command that outputs too much (or unlimited) data, for example
find /proc
oryes
, the browser (Firefox, even Chrome) will be very slow or gets frozen. This performance issue is due to the algorithm you use when rendering output on screen : you first write the entire data into a buffer and then you display it. This means : the data is read twice.I know this is not quite simple, but I wonder is it possible to do better to get higher performance so that the browser will not get frozen at least.
The text was updated successfully, but these errors were encountered: