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

iOS - App is slow and device heats up easily when performing basic functions #41534

Closed
6 tasks done
lanitochka17 opened this issue May 2, 2024 · 17 comments
Closed
6 tasks done
Assignees

Comments

@lanitochka17
Copy link

lanitochka17 commented May 2, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.70-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch New Expensify app
  2. Log in to account that have some reports
  3. Open the report
  4. Perform a few basic actions such as closing the report while it is loading, submitting expense, opening expense report etc

Expected Result:

App will not slow down and heat up while performing basic functions

Actual Result:

App slows down and heats up easily while performing basic functions. It is very laggy compared to production app.
Sometimes when closing report that is still loading, it reopens

Workaround:

Unknown

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

Screenshots/Videos

Add any screenshot/video evidence

Bug6469319_1714679828439.staging.mp4

Bug6469319_1714679828436!Profile_trace_for_1.4.70-0.cpuprofile

View all open jobs on GitHub

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

Triggered auto assignment to @deetergp (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
Contributor

github-actions bot commented May 2, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@lanitochka17
Copy link
Author

@deetergp FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

Production:

production.MP4

@francoisl
Copy link
Contributor

@deetergp did you have a chance to look into this?

@francoisl
Copy link
Contributor

Checked our logs to see if there was any noticeable increase in the perf measurements we did recently. We don't log the app versions so I had to group by date instead, here's the data:

Details

Internal log search: blob:"SendPerformanceTiming API Request" AND blob:ios.staging.new.expensify*

{
    "ios.staging.new.expensify.switch_report.warm": {
        "2024-05-03": {
            "avgMs": 755.71,
            "dataPointsCount": 21
        },
        "2024-05-02": {
            "avgMs": 838.05,
            "dataPointsCount": 361
        },
        "2024-05-01": {
            "avgMs": 1102.53,
            "dataPointsCount": 350
        },
        "2024-04-30": {
            "avgMs": 251.1,
            "dataPointsCount": 418
        }
    },
    "ios.staging.new.expensify.chat_render": {
        "2024-05-03": {
            "avgMs": 416.8,
            "dataPointsCount": 41
        },
        "2024-05-02": {
            "avgMs": 293.47,
            "dataPointsCount": 833
        },
        "2024-05-01": {
            "avgMs": 76.67,
            "dataPointsCount": 899
        },
        "2024-04-30": {
            "avgMs": 84.61,
            "dataPointsCount": 1124
        }
    },
    "ios.staging.new.expensify.trie_initialization": {
        "2024-05-03": {
            "avgMs": 193,
            "dataPointsCount": 10
        },
        "2024-05-02": {
            "avgMs": 197.47,
            "dataPointsCount": 161
        },
        "2024-05-01": {
            "avgMs": 175.2,
            "dataPointsCount": 161
        },
        "2024-04-30": {
            "avgMs": 192.06,
            "dataPointsCount": 141
        }
    },
    "ios.staging.new.expensify.calc_most_recent_last_modified_action": {
        "2024-05-03": {
            "avgMs": 3.22,
            "dataPointsCount": 94
        },
        "2024-05-02": {
            "avgMs": 208.54,
            "dataPointsCount": 1229
        },
        "2024-05-01": {
            "avgMs": 83.99,
            "dataPointsCount": 1351
        },
        "2024-04-30": {
            "avgMs": 4598.3,
            "dataPointsCount": 1180
        }
    },
    "ios.staging.new.expensify.homepage_initial_render": {
        "2024-05-03": {
            "avgMs": 181.06,
            "dataPointsCount": 17
        },
        "2024-05-02": {
            "avgMs": 117.65,
            "dataPointsCount": 235
        },
        "2024-05-01": {
            "avgMs": 7206.46,
            "dataPointsCount": 233
        },
        "2024-04-30": {
            "avgMs": 76.06,
            "dataPointsCount": 250
        }
    },
    "ios.staging.new.expensify.search_render": {
        "2024-05-03": {
            "avgMs": 1875,
            "dataPointsCount": 1
        },
        "2024-05-02": {
            "avgMs": 701.85,
            "dataPointsCount": 48
        },
        "2024-05-01": {
            "avgMs": 441.14,
            "dataPointsCount": 37
        },
        "2024-04-30": {
            "avgMs": 393.02,
            "dataPointsCount": 58
        }
    },
    "ios.staging.new.expensify.load_search_options": {
        "2024-05-03": {
            "avgMs": 215,
            "dataPointsCount": 1
        },
        "2024-05-02": {
            "avgMs": 402.35,
            "dataPointsCount": 65
        },
        "2024-05-01": {
            "avgMs": 227.45,
            "dataPointsCount": 69
        },
        "2024-04-30": {
            "avgMs": 244.49,
            "dataPointsCount": 144
        }
    },
    "ios.staging.new.expensify.switch_report.cold": {
        "2024-05-03": {
            "avgMs": 5090,
            "dataPointsCount": 1
        },
        "2024-05-02": {
            "avgMs": 7534.63,
            "dataPointsCount": 43
        },
        "2024-05-01": {
            "avgMs": 2269.1,
            "dataPointsCount": 39
        },
        "2024-04-30": {
            "avgMs": 1051.89,
            "dataPointsCount": 73
        }
    }
}

There are significant increases for ios.staging.new.expensify.chat_render and ios.staging.new.expensify.load_search_options, but they're based on fewer measurements (especially the latter, only 1)

Looking at all the logs for ios.staging.new.expensify.chat_render, there are few outlier values for the account [email protected] today that make the average go up, but other than that nothing out of the ordinary 🤔

I don't have a physical iPhone and don't see anything weird on a simulator, @deetergp any chance you can try with a HT account on browserstack (or a physical iphone if you have one)

@deetergp
Copy link
Contributor

deetergp commented May 3, 2024

I've spent the last 20 minutes in the latest iOS staging build on my iPhone 13 Pro and did not notice any additional heat coming from the device. I did enable profiling and local logging for some of it but have little idea of what to make of any of it 😅

logs-2024-05-03 15_36_23.782.txt
App_Info_1.4.70-0.json
Profile_trace_for_1.4.70-0.cpuprofile

@mallenexpensify
Copy link
Contributor

My iOS app is wonky, chat's not loading or sending. It might be heating up, it also appears to be sucking battery life, dropped 3 or 4 percentage points in less than 5 mins (which could be from excessive loading?)

@francoisl
Copy link
Contributor

francoisl commented May 3, 2024

@mallenexpensify any chance you could try with this ad-hoc build? It's kind of a shot in the dark, but there was a known issue with a recent update for react-native-onyx that caused another blocker, and I'm wondering if it could also explain the performance changes you've been seeing.

@marcaaron
Copy link
Contributor

Just a heads up I downloaded the latest TestFlight and gave it a spin. I'm not experiencing any of the issues described here. Some OpenReport calls are still slow, but nothing obvious like a hot phone, jank, or battery dropping rapidly.

Waiting for @mallenexpensify to test as well.

@marcaaron
Copy link
Contributor

Realizing I was not on the latest 😄 Testing on the latest now... @mallenexpensify maybe you can do the same.

@marcaaron
Copy link
Contributor

Ok same result - the app seems fine (APIs are a bit slow but that's expected). This is now our last blocker. If nobody can reproduce any noticeable performance difference between staging and production I would motion to take off the blocker label. But will wait a bit to give QA and @mallenexpensify a chance to test.

@marcaaron
Copy link
Contributor

Making a judgment call here and choosing to not block the deploy on this one. We had Matt test on the latest staging compared to production and both are pretty slow right now.

@marcaaron marcaaron added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels May 7, 2024
@melvin-bot melvin-bot bot removed the Overdue label May 7, 2024
@deetergp
Copy link
Contributor

deetergp commented May 8, 2024

Has anyone actually been able to recreate this or is it a red herring?

@mallenexpensify
Copy link
Contributor

On 1.4.72 on iOS, just tested again, was at 94% at 10:56. did a bunch of stuff and it's 91% at 11:04 and the phone is warmer than when started. BUT... I feel like it's better? App feels a lil faster

@deetergp
Copy link
Contributor

I am going to close this. We've deployed a few times since this issue was created and nobody seems to be complaining about it.

@mallenexpensify
Copy link
Contributor

Do you think it's worth it to post in #newdot-performance in case others want to review or reopen? I'm on fence, mainly cuz this issue is hella vague

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants