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 V3 Conversation Performance #519

Closed
nplasterer opened this issue Oct 26, 2024 · 4 comments
Closed

Improve V3 Conversation Performance #519

nplasterer opened this issue Oct 26, 2024 · 4 comments
Assignees

Comments

@nplasterer
Copy link
Contributor

Benchmark and add local mem caching to speed up performance.

@nplasterer nplasterer self-assigned this Oct 26, 2024
@neekolas
Copy link
Contributor

What exactly would we be caching? The V2 mem cache is for the conversations, which are already stored in the V3 DB

@nplasterer
Copy link
Contributor Author

So I did a little digging to try and get to the bottom of where the performance issues truly are. This is the side by side comparison of iOS proper and iOS RN. It looks like syncing is just going to be 2x slower than loading from V2 was. Something we would need to improve on the libxmtp side. As for loading it looks like loading in V3 is 3x faster than loading from the mem cache in iOS proper but 3x slower in RN. So something is having trouble serializing across the bridge.

User Action iOS Time (ms) RN Time (ms)
Alix loaded 50 v2Convos 122.92 120
Alix 2nd loaded 50 v2Convos 9.14 13
Davon synced 50 Dms 307.52 240
Davon loaded 50 Dms 3.78 30

@nplasterer
Copy link
Contributor Author

So I think the culprit is the peerInboxId. I think we need a join table of sorts in libxmtp to make this look up a lot less costly.

@nplasterer
Copy link
Contributor Author

xmtp/libxmtp#1196

@github-project-automation github-project-automation bot moved this from In Progress to Done in V3 Backlog Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants