20248e1c2e
This test is launcing a subprocess with N parallel tracks. Each track is effectively a child isolate that will make a tail call to another child isolate. This process will continue until a reload is requested. => So it tests performing hot-reload of an application that has a lot of isolate creation, initialization, destructions in it. Right now it uses N=20 for normal architectures (and N=2 for simulators). It turns out that part of the slowness of this test is due to the subprocess's "vm-service" sending massive amounts of data via the websocket to the parent process that performs reloading: Each isolate will produce 4 events: * IsolateStart * IsolateRunnable * ServiceExtensionAdded * IsolateExit and send those to the `vm-service` isolate. The service isolate will then send those further via the WebSocket API to the parent process. => For 400k isolates this may send 3 GB of data via websocket. => The individual events most likely result in individual syscalls. => Networking stack on windows/mac may not be soo good, which would explain why it's more likely to time out there vs linux We ensure the helper reload utilites unsubscribe to the "isolate" stream once there's no longer a need for it. => This will avoid the 3 GB of network traffic. => It will avoid a subset (but not all) of the isolate -> vm-service events Issue https://github.com/dart-lang/sdk/issues/51347 TEST=vm/dart{,_2}/isolates/reload_many_isolates_live_and_die_test Change-Id: I971b983a08ea8febd38e8b40a53ed6b114c4daca Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306421 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>