Don't wait on stream listening in DevTools start up#3320
Don't wait on stream listening in DevTools start up#3320elliette merged 1 commit intoflutter:masterfrom
Conversation
| serviceStreamName, | ||
| ]; | ||
|
|
||
| await Future.wait(streamIds.map((String id) async { |
There was a problem hiding this comment.
remove the Future.wait as well. it isn't doing anything useful now that the result is unawaited.
This change could cause some tricky race conditions.
Main race condition: need to ensure that we are listening for isolate events before we fetch the isolate. Otherwise we could incorrectly believe the isolate is paused because we missed the resume event.
@bkonyi I know a lot of the streams now have history. If all the streams where race conditions matter are ones where we can fetch with history then we are safe.
There was a problem hiding this comment.
Oh interesting! Unless I'm misunderstanding something, it looks like currently we are fetching the isolate before listening for the isolate events. (await isolateManager.init(isolates) is the call right before this call to start listening to the streams). Might make sense to send off the stream listen requests earlier.
…up (flutter#3320)" (flutter#3321)" This reverts commit bb5e4a0.
We are currently
awaitingsetting up listeners on all the streams in thevmServiceOpenedmethod. This can take ~300 ms to complete. I don't think it's necessary for us to block on getting the listeners registered.Note: I've also opened dart-lang/sdk#47042 to investigate the weird throttling behavior I'm seeing on these requests.