Closed
Description
Hi thanks for wonderful dart and flutter!
Scenario: My app have some image processing features in C++, which takes 1s (for example) to compute the output image from the input image. Since I do not want to block the main isolate (otherwise the ui will freeze), I do the following:
Main Isolate <-----SendPort----> Worker Isolate <----FFI----> C++ Code
However, you know images are quite huge, say, 30MB per image. By doing this, one image will have at least 3 copies! The source image is in main isolate, then using SendPort, it is copied (!) to the worker isolate, then again copied (!) to c++ native code. Thus, we use at least 90MB memory when we can simply use 30MB memory, let alone the wasted time for memory copying.
Is there any ways? Thank you so much!