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

A blocking process freezes entire ide. #11805

Closed
ta3pks opened this issue Sep 9, 2016 · 7 comments
Closed

A blocking process freezes entire ide. #11805

ta3pks opened this issue Sep 9, 2016 · 7 comments
Assignees
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues terminal Integrated terminal issues
Milestone

Comments

@ta3pks
Copy link

ta3pks commented Sep 9, 2016

  • VSCode Version:1.5.1
  • OS Version:ubuntu 16.4

Steps to Reproduce:

  1. execute a script with long for or something blocks the process
  2. in a native terminal the loop will not freeze the terminal and stream the output of the loop however in vscode this process freezes the entire ide not even just terminal so you cannot even terminate the terminal without terminating entire vscode which can cost serious data loss in an unsaved workspace
@ramya-rao-a ramya-rao-a added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Sep 9, 2016
@bpasero bpasero assigned Tyriar and unassigned bpasero Sep 10, 2016
@Tyriar Tyriar added the terminal Integrated terminal issues label Sep 10, 2016
@Tyriar
Copy link
Member

Tyriar commented Sep 10, 2016

@NikosEfthias is this only happening with a large amount of output? I believe this is due to a perf regression when the scroll bar was introduced.

If this is like the past performance issue then the keystrokes probably are being sent to the terminal, it's just taking too long for the renderer to catch up.

@ta3pks
Copy link
Author

ta3pks commented Sep 10, 2016

this is only happening with a large loop without any pause doing something something like

a=1
while [[ true ]] 
 do echo $((a++))
done

this will freese the entire ide however in xterm it does not have any issue printing values and receiving interrupts

@Tyriar
Copy link
Member

Tyriar commented Sep 11, 2016

xterm seems so snappy because it syncs the renderer with the shell process. A PR done to xterm.js (xtermjs/xterm.js#146) was put together to do this, however the side effect of it was that it took an enormous amount of time to print all the output due to each page of data having to be replicated in the DOM and displayed. So we ended up opting for running the actual process as fast as possible and capping the amount of data pushed to the DOM. The introduction of the scroll bar caused this to regress some though.

Improvements to performance are still being explored in xtermjs/xterm.js#134 and xtermjs/xterm.js#150

@ta3pks
Copy link
Author

ta3pks commented Sep 11, 2016

can't puttting small delay between each node creation help something like 10 ms is difficult to feel as a user i think

@Tyriar
Copy link
Member

Tyriar commented Sep 12, 2016

@NikosEfthias currently I think there's max 30 updates to the DOM per second, but all that text still needs to be processed. So the scroll bar added in 30 scroll events a second in addition to everything else which I'm guessing was enough to lock it up.

@Tyriar
Copy link
Member

Tyriar commented Dec 31, 2016

Should be fixed by xtermjs/xterm.js#438 🎆

@Tyriar
Copy link
Member

Tyriar commented Jan 20, 2017

Fixed with all the performance improvements made this version, Insiders should be silky smooth. #17875

@Tyriar Tyriar closed this as completed Jan 20, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

4 participants