Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve wrapper performance #490

Open
nplasterer opened this issue Sep 11, 2024 · 0 comments
Open

Improve wrapper performance #490

nplasterer opened this issue Sep 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@nplasterer
Copy link
Contributor

Discovered in this PR #457

We have some suboptimal performance in React Native versus Native

Action Android RN Android
Alix loaded 1000 groups 24ms 2464ms
Alix synced 1000 groups 6ms 18ms
Bo synced 1000 groups 2682ms 2426ms
Bo loaded 1000 groups 13ms 2443ms

This is going to become more and more necessary to fix once we have 1to1 backed by our MLS local db.

What I discovered on digging in is that the wrapper function for groups takes ~3ms to complete so for 1000 groups it would take 3000ms. I tried a few things to speed it up but even just 2x performance isn't going to get us where we want to be. I think we need a big fix

My suggestion is that we create protos for each of the wrapped functions. Then we pass those protos directly from the libxmtp database keeping them in proto form the entire way out to RN. This should improve performance a lot. My only concern is that we also encode the member list and other functions so the proto would have to be pretty complex.

@nplasterer nplasterer added the enhancement New feature or request label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant