-
Notifications
You must be signed in to change notification settings - Fork 3k
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] User unable to navigate to chat in search results (slow API call blocks 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 |
Are we still actively working on this one?
I don't think anyone is actively looking into this. But I got curious about whether the performance is still bad and checked out charts for this one and it's mostly not too bad, but there is still one user who has crazy bad times for some unknown reason. I'm also trying to tell the difference between this issue and this one here: #46590 Can we consolidate maybe? |
Hm, they are a bit different. This one is about that while actively searching the performance is bad, the other one is about opening the search page for a fresh session for the first time being quite slow. |
Ok thanks, I think I will remove the stuff about this being "two parts" and related to the server then - just to give some clearer focus to the issue. |
SearchForReports
took 110602ms (~2min) to complete, seemingly blocking the whole app
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?
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 clicked on a search result, but nothing happens. The user is only brought to the chat once the search API call finishes.
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: