49d7f5056f
With the optimizations suggested this does now equal or outperform the JSON serializer in all scenarios, the latest numbers from the benchmark are as follows: Isolate.spawn + SerializationMode.jsonClient: 0:00:00.041666 Isolate.spawnUri + SerializationMode.jsonClient: 0:00:00.069551 Separate process + SerializationMode.jsonClient: 0:00:00.177171 Isolate.spawn + SerializationMode.byteDataClient: 0:00:00.040990 Isolate.spawnUri + SerializationMode.byteDataClient: 0:00:00.059319 Separate process + SerializationMode.byteDataClient: 0:00:00.080008 Change-Id: If5431513c7487d8b7af350381e794cbd61c1be42 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232027 Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com> Auto-Submit: Jake Macdonald <jakemac@google.com> Commit-Queue: Jake Macdonald <jakemac@google.com>