-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Performance] SearchForReports
took 110602ms (~2min) to complete, seemingly blocking the whole app
#46593
Comments
Auto-assigning issues to engineers is no longer supported. If you think this issue should receive engineering attention, please raise it in #whatsnext. |
cc @sakluger (feel free to assign me as I (or someone from my team) will work on this ticket!) |
SearchForReports
took 110602ms (~2min) to complete seemingly blocking the whole appSearchForReports
took 110602ms (~2min) to complete, seemingly blocking the whole app
Just for context, on the backend side, it is a known issue that |
No update |
No update |
No update |
I just opened a PR hat shows a PoC for using web workers for running the search, which will unblock the main thread: I am now seeking approval on this new technical design here. (Note: I am OOO for the rest of the week and will continue next week Monday 19.08) |
Moving to weekly for now since Hanno is out until Monday. |
@kirillzyusko do you have time to look into that in parallel? Should be able to just slow down the |
@hannojg sure, I'll look into this 👀 |
@kirillzyusko thanks for helping! FYI I'll be OOO for the next week - hopefully, there will be some interesting new learnings when I return on 8/30. |
@marcaaron may I kindly ask you to verify a duration of this request on BE:
Timings of request are: As I can see the BE couldn't complete the request and returned: {
"jsonCode": 555,
"message": "555 Timeout peeking command",
"onyxData": [],
"requestID": "8a8df5b19956171a-SJC"
} But if you can double check that in your logs that would be a dope ❤️ |
Adding @kirillzyusko as an assignee on the issue. |
ah sorry, it's just outside the window of when we stop storing the logs. |
We're working on a PR that improves search speed (#48652). Hopefully that helps here too! |
No major updates, PR is still in progress. |
What's the latest on this one? |
@marcaaron I think @hannojg is working hard and pushing the PR forward. This PR is in review stage now 👀 |
Hey, i have a little update on this one. It seems we identified one of the performance issues that were occurring for the customer. Here is a profile trace that captures the lag/hang: Trace-20241001T081231.json.zip It specifically happens in App/src/components/OptionListContextProvider.tsx Lines 93 to 109 in a6d812c
We will work on solutions to improve this! Its either: So the current PR won't fix that, but we are on the way to get this one here fixed as well; will keep you updated! |
Sorry have been OOO - but that all sounds really promising, thanks! |
This issue has not been updated in over 15 days. @sakluger, @hannojg, @kirillzyusko, @marcaaron eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
I think this is still important, we are currently trying to allocate this task to someone in the team working on this soon! Monthly seems fine though |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
What performance issue do we need to solve?
The customer was opening NewDot and doing a search. The account is quite big. When running search for the first time in the app the
SearchForReports
took 110 seconds. During that time the user already clicked on a search result, but the user was only brought to the chat once the search query finished.This issue can be split into two aspects:
See this recording:
search_taking_forever.mov
What is the impact of this on end-users?
List any benchmarks that show the severity of the issue
The customer shared a profile trace with us:
Firefox 2024-07-25 10.42 profile.json.gz
(note: the trace also contains other test cases as well)
Additionally we have a HAR recording of the network requests that took that long. I hope that helps in identifying the query in the backend log system:
www.expensify.com_07-31-2024-16-53-27.har.zip
Proposed solution (if any)
None yet, I will go through the profile and see what can be optimised, what exactly caused those lags.
List any benchmarks after implementing the changes to show impacts of the proposed solution (if any)
not available yet
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v9.0.11-5
Reproducible in staging?: not tested
Reproducible in production?: yes
Email or phone of affected tester (no customers): customer
Logs: See performance file
Notes/Photos/Videos: See attached video
Expensify/Expensify Issue URL: n/a
Issue reported by: @hannojg
Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1721919928992729
View all open jobs on Upwork
The text was updated successfully, but these errors were encountered: