Skip to content

[UX Reliability] HIGH: Investigate and fix using multiple GetMissingOnyxMessages and ReconnectApp calls to load all Onyx data  #42136

@muttmuure

Description

@muttmuure

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


What performance issue do we need to solve?

e.g. memory consumption, storage read/write times, React native bridge concerns, inefficient React component rendering, etc.

When you haven't visited a chat for a while, we run GetMissingOnyxMessages (twice) then ReconnectApp twice. We are loading all Onyx data multiple times before showing it to the end user.

When you have not used the app in a while (I just switched from staging to prod and had not used prod in a while) this happens:

  1. We call one API command, which returns Your session has expired. Please sign in again (makes sense since I have not used it in a while)
  2. We call Authenticate
  3. We call UpdateAutomaticTimezone (I assume since I am on a different timezone than list time)
  4. It detects I have lots of missing onyx messages and calls GetMissingOnyxMessages this internally triggers a full load, since we don't have that many onyx messages saved
  5. (this is the problem I think) It calls ReconnectApp which returns again the same full response as the previous call)

What is the impact of this on end-users?

List specific user experiences that will be improved by solving this problem e.g. app boot time, time to for some interaction to complete, etc.

This series of operations creates additional work for the client, when all the end user wants is for the app to:

  • Load all messages efficiently
  • Render them

Whereas right now the additional "loading" operations mean that there is a delay to these events taking place.

List any benchmarks that show the severity of the issue

Please also provide exact steps taken to collect metrics above if any so we can independently verify the results.

I've started a discussion in #newdot-quality here

Proposed solution (if any)

Please list out the steps you think we should take to solve this issue.

We need to investigate why there are these redundant ReconnectApp and GetMissingOnyxMessages calls, and make sure that we can load all missing data in one performant call.

List any benchmarks after implementing the changes to show impacts of the proposed solution (if any)

Note: These should be the same as the benchmarks collected before any changes.

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Version Number: v1.4.73-3
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: @muttmuure
Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1715611536548199

View all open jobs on Upwork

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions