-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[vscode] Make the Relay Compiler Terminal Transient #4455
[vscode] Make the Relay Compiler Terminal Transient #4455
Conversation
If you enable `relay.autoStartCompiler`, the extension will open a compiler in a new Terminal on every VS Code reload (e.g. Developer: Reload Window). This can easily lead to many copies of the compiler running. Instead, we can mark the terminal with `isTransient`, and it won't survive reloads. While this means reloads must restart the compiler, it is very fast and this avoid many "Relay Compiler" terminals. Test Plan: - Debug on a project with `"relay.autoStartCompiler": true` - Reload the window - Note there is only one "Relay Compiler" terminal
cc @tbezman @captbaritone is this something you could help review and merge? Thanks! |
@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Awesome! Thanks for tracking this down. |
Just wanted to add my two cents: The compiler startup time depends on the size of your application. For us it takes 20-30 seconds. I would image it takes even longer in larger code bases. Would be cool if there was a solution that didn't require the compiler to restart. |
@tobias-tengler The only thing I can think of would be if we could somehow query the relay compiler process, but that seems quite complicated. Considering that a VS Code reload already restarts things like ESLint and TypeScript, this brings nice parity, but that is a good point that startup is not always fast. |
I think this change is better than the current state, and restarting is probably not too common. Let's start here. |
@captbaritone merged this pull request in f67e9c5. |
If you enable
relay.autoStartCompiler
, the extension will open a compiler in a new Terminal on every VS Code reload (e.g. Developer: Reload Window). This can easily lead to many copies of the compiler running.Instead, we can mark the terminal with
isTransient
, and it won't survive reloads. While this means reloads must restart the compiler, it is very fast and this avoid many "Relay Compiler" terminals.Test Plan:
"relay.autoStartCompiler": true