Closed Tienisto closed 2 weeks ago
After some debugging, I found out that the call of an opaque function itself is expensive, regardless of the payload.
Tried to remove the parameter, so no payload is needed. Still it takes very long to call the function.
pub async fn add(&mut self) -> Result<(), RhttpError> {
// This method still needs 100ms or more to complete from Dart side.
Ok(())
}
My buffer implementation was causing the slowness.
Happy to see it is solved! If there are any further questions just ping me :)
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.
Is your feature request related to a problem? Please describe. I don't know if it's the nature of SSE or if it's specifically to opaque function calls, but calling opaque functions with binary data is very slow.
Describe the solution you'd like Improve performance of calling opaque functions
Describe alternatives you've considered Maybe use CST (mentioned in https://cjycode.com/flutter_rust_bridge/guides/miscellaneous/codec#comparison), but I could not find an annotation to change that.
Additional context