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
fix #3697 Remove blocking await. #3699
Conversation
PR removes blocking await when starting a file watcher. This is particularly important when starting Theia with a large workspace root as the file watch will block Theia loading. Signed-off-by: Casey Flynn <caseyflynn@google.com>
I wonder how await can be blocking. Blocking code usually is synchronous and does not allow node process to handle new requests. In this case, the code seems to be async and should allow handling of other requests. |
@akosyakov you are right that an await allow for non blocking code, unless something in the Theia boot-up sequence someone specifically wait for this before starting the application. Somewhere inside a
When I opened Theia on |
@marechal-p can you profile the frontend please and find out with the root cause why it takes 45s? We need to rewrite I am also not against these changes. I want to understand why it helps and how I can verify it + unwatch should be handled properly. |
@akosyakov the long wait is because of something silly:
I made a diff to see if I could fix it where the wrong components were waiting for it: 7bb1e9b With this, the |
This seems to resolve the issue for me too. Can we apply this fix to Master? |
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
@marechal-p thanks for the analysis, it is clear now @caseyflynn-google as soon as tests are green I've pushed one commit to address https://github.com/theia-ide/theia/pull/3699/files#r238060287 The |
PR removes blocking await when starting a file watcher. This is
particularly important when starting Theia with a large workspace root
as the file watch will block Theia loading.
Signed-off-by: Casey Flynn caseyflynn@google.com