|
|
|
|
|
by SpaghettiX
1733 days ago
|
|
Dart is not single threaded. Dart isolates are the equivalent of threads, but they cannot share memory like threads. As anyone who works in UI knows the UI/ main thread is 1 thread (not a thread pool), because concurrent UI development hasn't been done well. https://stackoverflow.com/a/5544714/7365866 If you want to do heavy computation, you can easily call `compute()`. Dart VM manages a thread pool for that. A thread can execute multiple isolates though, its not a 1-1 mapping between threads and isolates. IMHO, it was designed for developer productivity (not just speed of writing code), but JIT + AOT compilation to provide quick development but still fast apps for users, and as you can tell, many developers love it. An existing problem for Flutter is shader compilation jank, but this is being worked on by the Flutter team. Read "Why did Flutter choose to use Dart?": https://flutter.dev/docs/resources/faq#why-did-flutter-choos... |
|