Decode JSON using Dart Isolates

52 Views Asked by At

Does it make sense to do jsonDecode with Isolate if the message passing between isolates is encoding into binary data and back again?

1

There are 1 best solutions below

4
Randal Schwartz On

If decoding a chunk of JSON requires more than a frame of CPU, you'll get dropped frames, so it's pretty much mandatory at that point. And if you use Isolate.run, there's minimal copying between threads, especially on the return value.