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

perf: Optimize messenger initialization #21642

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

ilmotta
Copy link
Contributor

@ilmotta ilmotta commented Nov 20, 2024

Fixes #21456

Summary

This PR integrates the optimizations coming from the status-go PR status-im/status-go#6106. Now messenger filters are set-up concurrently and we can call the endpoint wakuext_chatsPreview twice: once for non-community chats and once for community chats. This way, the user should be able to see some data render before the slow part ends (community-related data). All the hard work is in status-go and executed by @qfrank

Areas that may be impacted

  • Login
  • Loading of data after login (contacts, chats, etc)

Steps to test

We need to check two cases for regression (functional and non-functional):

  1. You login with a profile with many contacts, chats, opened/joined communities, notifications, etc. If you see all the data after login there's no functional regression.

  2. Login with a profile with loads of data and roughly compare the time to see data arrive at different screens (contacts, opened/joined communities, etc) compared to develop. In theory, non-community data (e.g. 1:1 chats) can now arrive earlier and doesn't need to wait for the longer times to set-up filters related to community chats. Whichever call to status-go returns first will immediately trigger the client code to render the data.

I already superficially tested both cases, but more extensive QA would be good.

status: ready

@ilmotta ilmotta self-assigned this Nov 20, 2024
@ilmotta ilmotta marked this pull request as draft November 20, 2024 01:56
@status-im-auto
Copy link
Member

status-im-auto commented Nov 20, 2024

Jenkins Builds

Click to see older builds (4)
Commit #️⃣ Finished (UTC) Duration Platform Result
7b4c80a #1 2024-11-20 02:01:25 ~5 min android-e2e 📄log
✔️ 7b4c80a #1 2024-11-20 02:01:31 ~5 min tests 📄log
7b4c80a #1 2024-11-20 02:02:24 ~6 min android 📄log
7b4c80a #1 2024-11-20 02:05:13 ~8 min ios 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ b71f789 #2 2024-11-22 02:47:14 ~5 min tests 📄log
✔️ b71f789 #2 2024-11-22 02:50:10 ~8 min android-e2e 🤖apk 📲
✔️ b71f789 #2 2024-11-22 02:51:27 ~9 min android 🤖apk 📲
✔️ b71f789 #2 2024-11-22 02:52:07 ~10 min ios 📱ipa 📲
✔️ 313d877 #4 2024-11-22 11:54:22 ~5 min tests 📄log
✔️ 313d877 #4 2024-11-22 11:56:41 ~7 min android-e2e 🤖apk 📲
✔️ 313d877 #4 2024-11-22 11:59:23 ~10 min android 🤖apk 📲
✔️ 313d877 #4 2024-11-22 12:00:07 ~11 min ios 📱ipa 📲

@ilmotta ilmotta force-pushed the ilmotta/use-optimized-filter-initialization branch from 7b4c80a to b71f789 Compare November 22, 2024 02:41
@ilmotta ilmotta marked this pull request as ready for review November 22, 2024 02:41
@ilmotta ilmotta changed the title [DRAFT] perf: Optimize messenger initialization perf: Optimize messenger initialization Nov 22, 2024
Copy link
Member

@smohamedjavid smohamedjavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A much needed optimisation 🚀
Thanks @qfrank @ilmotta 🫡

@ilmotta ilmotta force-pushed the ilmotta/use-optimized-filter-initialization branch from b71f789 to 7282fb6 Compare November 22, 2024 11:46
@ilmotta ilmotta force-pushed the ilmotta/use-optimized-filter-initialization branch from 7282fb6 to 313d877 Compare November 22, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: CONTRIBUTOR
Development

Successfully merging this pull request may close these issues.

Message history loading takes up to 20 sec
3 participants