## Description This PR optimize memory footprint of RPC (i.e., memory used by serde).
Serde uses up more than 10x memory to deserialize a json message when using `#[serde(flatten)]` and `#[serde(tag = "request"]`. In our case, we cannot handle more than 2M message because serde will allocation more than 100M bytes memory. The root cause is still unknown. ## Type of change (select or add applied and delete the others) - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) ## How has this been tested? CI tests. ## Checklist - [x] Fork the repo and create your branch from `master`. - [x] If you've added code that should be tested, add tests. - [x] If you've changed APIs, update the documentation. - [x] Ensure the tests pass (see CI results). - [x] Make sure your code lints/format. You can view, comment on, or merge this pull request online at: https://github.com/apache/incubator-teaclave/pull/577 -- Commit Summary -- * Optimize RPC memory footprint of serde -- File Changes -- M examples/python/wasm_rust_psi_payload/Cargo.lock (2) M rpc/src/request.rs (1) M sdk/python/teaclave.py (48) M services/proto/proto_gen/templates/proto.j2 (2) M tests/scripts/functional_tests.py (9) M types/src/staged_function.rs (1) -- Patch Links -- https://github.com/apache/incubator-teaclave/pull/577.patch https://github.com/apache/incubator-teaclave/pull/577.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/apache/incubator-teaclave/pull/577