Open govanyjj opened 4 years ago
Can you provide a way to reproduce the issue, e.g. the code and step by step guide? It should not take seconds to spawn an isolate.
flutter run
from command line)flutter run --release
)./cc @mkustermann @aam
Can you provide a way to reproduce the issue, e.g. the code and step by step guide? It should not take seconds to spawn an isolate.
* Do you see this sort of delays when you run your application outside of the IDE (e.g. when you just use `flutter run` from command line) * Do you see this sort of delays in release builds of your application? (`flutter run --release`).
/cc @mkustermann @aam
Hi@mraleph : Thank you for your reply. When I tried to use the two suggestions you gave, currently testing it can give a response within 30 milliseconds quickly, and there is no long-term unresponsive situation under the IDE.
Reproduced in the IDE, as shown in the following code: Github
I/flutter (30706): create isolate finish cost time 7801
I/flutter (30706): create isolate finish cost time 7834
I/flutter (30706): create isolate finish cost time 7754
I/flutter (30706): create isolate finish cost time 9757
I/flutter (30706): create isolate finish cost time 9685
I/flutter (30706): create isolate finish cost time 9907
Version: 1.43.2
Commit: 0ba0ca52957102ca3527cf479571617f0de6ed50
Date: 2020-03-24T07:34:57.037Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.2.0
I/flutter (30843): create isolate finish cost time 3024
I/flutter (30843): create isolate finish cost time 3013
I/flutter (30843): create isolate finish cost time 2962
I/flutter (30843): create isolate finish cost time 3000
I/flutter (30843): create isolate finish cost time 3029
I/flutter (30843): create isolate finish cost time 3020
I/flutter (30843): create isolate finish cost time 3023
I/flutter (30843): create isolate finish cost time 3031
Android Studio 3.6
Build #AI-192.7142.36.36.6200805, built on February 12, 2020
Runtime version: 1.8.0_212-release-1586-b4-5784211 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.2
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Sounds like this is caused by IDE debugger being attached.
@rmacnak-google @bkonyi do you maybe recognize the issue?
When I execute the following code, I find that waiting for success takes about 1 second or more. Also, when I need to create "isolation" multiple times in my application, I usually wait a long time. When waiting for a long time, I use "CALL STACK" in vscode and use pause> Continue to operate a single "isolate", Then "isolate" will execute correctly and give a return value, otherwise it will wait forever.
What can I do to get the return value of "isolate.spwan" quickly?