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

Engineering: Improve build perf #85098

Closed
joaomoreno opened this issue Nov 19, 2019 · 3 comments
Closed

Engineering: Improve build perf #85098

joaomoreno opened this issue Nov 19, 2019 · 3 comments
Assignees
Labels
engineering VS Code - Build / issue tracking / etc.

Comments

@joaomoreno
Copy link
Member

joaomoreno commented Nov 19, 2019

image

These measurements were made on my Linux beefy box.

Running yarn watch will spawn 3 node processes:

  • yarn run watch, takes 700MB RAM
  • node gulp watch --max-old_space_size=4095, takes 600MB RAM
  • gulp watch --no-respawning, takes 4.5GB RAM (it first goes up to 5GB, then garbage collects)

The entire build in a dev box requires +6GB RAM.

On top of that, everything runs in the same one thread, even though we have a lot of potential parallelization (each extension's compilation could run independently) and we all have multi-core CPUs in our machines.

So, we're currently in a bad spot both in terms of CPU and memory. We need ideas on how to break this up and improve our situation.

@mjbvz Can TypeScript help us in anyway here? Is there such a feature which allows us to easily split our code base into components? I remember something was in the backlog, I'm just not aware of its status.

cc @microsoft/vscode

@joaomoreno joaomoreno added the engineering VS Code - Build / issue tracking / etc. label Nov 19, 2019
@jrieken
Copy link
Member

jrieken commented Nov 19, 2019

I do remember that we run all gulp-tsb in the same process because we "coordinate" the printing of error messages and that would be harder if it happens in separate processes.

@Tyriar
Copy link
Member

Tyriar commented Nov 19, 2019

@jrieken looked at moving off of gulp-tsb in favor of tsc a while ago but I think there were performance issues that would slow us down too much, instead of taking lots of RAM it would take a much longer time to recompile under some cases. A possible solution to this would be to use project references everywhere but that's a huge change and also comes with several other issues like the editor acting up sometimes.

@mjbvz
Copy link
Collaborator

mjbvz commented Nov 19, 2019

See microsoft/TypeScript#33329 for moving off of gulp tsb. That is the proper long term fix (there still may be memory usage concerns with tsc but it's better to be on standard tooling)

@mjbvz mjbvz removed their assignment Dec 4, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
engineering VS Code - Build / issue tracking / etc.
Projects
None yet
Development

No branches or pull requests

4 participants