-
Notifications
You must be signed in to change notification settings - Fork 6k
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
support init engine asynchronous #20433
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
1 similar comment
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
@googlebot I fixed it. |
This approach looks similar to #18047. That PR is very close to pass all the tests but there's some mysterious "Windows Host Engine" failure. @lybeen : can you please check if that PR is helpful in your case, and whether you're able to revise your PR to pass all tests? |
I've worked with this issue in the past with another contributor. There are too many places where we assume we have an initialized Shell. I don't want to create the opportunity to create bugs by allowing shell to be in yet another state. I think this is a good goal but the change should use std::future to represent a shell that hasn't been initialized yet so that we can safely migrate the code to using it. The previous contributor did most of the work but ran into memory problems on windows which they didn't address so it stalled out. Edit: the other PR: #18047 |
Closing this as we want to go with another approach. |
Description
In Engine initialization, we have to wait for all other threads ready, it has an opportunity to improve it, so I make this asynchronous.
Comparison
Before
After
Conclusion:
It's clearly show that it makes ui thread asynchronous , platform thread does't have to wait for it in engine initialization.
It may make about 200ms time for platform thread.
Related Issues
19641
This pr seems a little hackable, my solution seems a bit more sensible.
Tests
I added the following tests:
Go through all test cases
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.Breaking Change
Did any tests fail when you ran them? Please read [handling breaking changes].