dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.06k stars 1.55k forks source link

Document or remove the limitation on the number of concurrently running mutators #54687

Open mraleph opened 7 months ago

mraleph commented 7 months ago

We should decide what we want to do with the currently existing limitation on the number of concurrently running mutators.

We should either make it more known (e.g. document it) or we should remove it.

We could even add a runtime warning: when we are trying to enter isolate as a mutator and are waiting for too long due to the limit on the number of mutators - we should consider reporting this error.

I don't think the limitation itself is all that bad for mobile usages - because it does not make sense to spawn so many concurrently running isolates anyway, but it might be causing real issues to server side / batch uses of Dart.

/cc @mkustermann @aam @rmacnak-google @a-siva

mkustermann commented 7 months ago

There's a set of different aspects we can document

mraleph commented 7 months ago

A dart program cannot take advantage of more cores than this limit. Though as a language focused more on the client-side, it's currently also not a goal to scale to 100s of cores.

It might not be goal to scale to 100s of cores, but neither it is a goal to make it impossible to discover why you hit a scalability issue.

We would like to see Dart used more and more outside of client-side context - so it makes sense to avoid adding hidden limitations like this or at least make them easier to discover.

mkustermann commented 7 months ago

@mraleph Yes, the list I wrote above is what we can/should document. We can of course phrase it differently and just point out it's due to a technical limitation.

parlough commented 7 months ago

\cc @ericwindmill Just so you're aware of the discussion and possibilities here :) - Perhaps you have some thoughts too!