Skip to content

[$500] [HOLD for payment 2023-12-20] The whole queue of offline requests are processed when you come back online, delaying online requests #28172

Description

@muttmuure

https://expensify.slack.com/archives/C05LX9D6E07/p1695105894373289

Problem

When we're offline, we'll build up a ton of requests if we keep navigating. OpenReport is probably the biggest offender. That's bad because we'll process the whole queue once we're back online, and because of that requests that I actually need to execute when I'm online will have to wait until the whole queue is processed.

Let's say you have navigated to 5 reports while offline.

When you go online:

We'll start processing the queue.
Open report usually takes a couple seconds per request, so we'll wait 10s until you do all requests
Because we also queue the onyxUpdates for write requests, we'll need for the write operation for all of them to finish before we actually see anything in the report we just navigated

Solution

Only call OpenReport exactly once per report

Use a report metadata key to store if we have ever called the OpenReport for a specific report

Issue OwnerCurrent Issue Owner: @sakluger
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01697b67b9aa3280da
  • Upwork Job ID: 1742376039165644800
  • Last Price Increase: 2024-01-03

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsNewFeatureSomething to build that is a new item.

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions