Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.54k stars 2.89k forks source link

[$1000] Settings - There is a lag when transitioning between Account settings #47716

Open lanitochka17 opened 2 months ago

lanitochka17 commented 2 months ago

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


Version Number: 9.0.22-5 Reproducible in staging?: Y Reproducible in production?: Y 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. Navigate to https://staging.new.expensify.com/
  2. Log in with a new Gmail account
  3. Navigate to Account settings - About
  4. Click on "Inbox"
  5. Click on "Account settings"

Expected Result:

I should be able to navigate smoothly

Actual Result:

The app freezes after opening Account settings again on specific pages. Affects most of the pages on Account settings. The freeze can last from 2-5 seconds to a point where you have to restart the browser. Sometimes the app returns to normal after you click

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/3dfa8c19-c05b-4901-a1a9-df0d208acffc

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021846341339697727091
  • Upwork Job ID: 1846341339697727091
  • Last Price Increase: 2024-11-06
Issue OwnerCurrent Issue Owner: @s77rt
melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

lanitochka17 commented 2 months ago

@jliexpensify 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

codewaseem commented 2 months ago

I think same as https://github.com/Expensify/App/issues/47041

jliexpensify commented 2 months ago

Thanks @codewaseem - I think the root cause might be the same, as these issues are similar. I'll put a hold on this one, and then get Applause to re-test once https://github.com/Expensify/App/issues/47041 is resolved.

melvin-bot[bot] commented 2 months ago

@jliexpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

jliexpensify commented 2 months ago

Waiting on other PR

jliexpensify commented 1 month ago

@lanitochka17 can you re-test please? #47041 has been deployed to production and I can't reproduce this issue anymore,

isagoico commented 1 month ago

I'm still able to reproduce the issue on my side on 9.0.45-2. There's a notable freeze when navigating to About.

https://github.com/user-attachments/assets/52f6e9fd-0e2a-4fc0-89e3-000d8da5d664

adhorodyski commented 1 month ago

@isagoico I'm able to only get 1/10 of this hang on my end, though performance profiling shows ~500ms is spent on setting up Lottie. I can also get rid of this hang completely when removing the animated sections.

Could you please record a Chrome profiling session for us? Steps are here:

isagoico commented 1 month ago

@adhorodyski Tried again today and the freeze is not as notable as when I reproduced back here.

I recorded the Profile here Profile.zip.

adhorodyski commented 1 month ago

Screenshot 2024-10-09 at 13 45 44

Yup, looks like this is the same thing on your end.

adhorodyski commented 1 month ago

I've found this PR that postpones setting the asset so it delays the initiation - we can see the same in the Hermes trace as well. Looks like this was desired to offload this & now we're just experiencing it each time we load this page?

useEffect(() => {
        setAnimationFile(source.file);
    }, [setAnimationFile, source.file]);

This block runs each time we mount this component to the screen so it might be that we just re-run the whole internal pipeline for Lottie.

My assumption is that we started offloading this to get the gains elsewhere and now we're "paying the price" for it, is that right?

adhorodyski commented 4 weeks ago

@jliexpensify the issue we're waiting for is closed now, what action can we take in this one?

jliexpensify commented 3 weeks ago

Hi @adhorodyski - hmm so I guess if this issue is still reproducible, we should dig into this further and try and fix the root cause. So we'd need to treat this as a separate issue to https://github.com/Expensify/App/issues/47041.

The other consideration is how bad this issue is, and whether it can actually be widely and consistently reproduced. If it's a niche issue, then maybe we can consider not fixing it? But we should probably bring this up publicly before making any decisions around it.

adhorodyski commented 3 weeks ago

It can be consistently reproduced, though I'd say it's not worth spending time on it at the moment unless we get more reports of this actually being problematic. I'm experiencing a 115-200ms (mac m1 pro) lag now due to this animation which is not that big of a deal (?)

cc @mountiny curious about your opinion on this? I only want to prevent us chasing a 100ms lag on a settings page, but can dive deeper into this if we consider this being important (though we intentionally offloaded this lag to the subpages before).

If no one can reproduce the big UI hangs anymore the issue is not about 'freezing the app', but rather 'experiencing a slight lag' which seems like a smaller priority thing.

adhorodyski commented 3 weeks ago

Here's how big of a lag I'm getting on the JS thread (2 visits, ~117ms each):

Screenshot 2024-10-15 at 16 29 40

mountiny commented 3 weeks ago

Hmm tough one. I would say we can make this external for $1000 and see if anyone can fix it in a root. I agree it might not be worth it having an agency worker on this, if we are only reproducing the lag

melvin-bot[bot] commented 3 weeks ago

⚠️ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.

melvin-bot[bot] commented 3 weeks ago

Job added to Upwork: https://www.upwork.com/jobs/~021846341339697727091

melvin-bot[bot] commented 3 weeks ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External)

jliexpensify commented 3 weeks ago

Posted here

mvtglobally commented 3 weeks ago

Issue not reproducible during KI retests. (First week)

s77rt commented 3 weeks ago

Not overdue. Looking for proposals

s77rt commented 2 weeks ago

Same ^

melvin-bot[bot] commented 2 weeks ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Anaslancer commented 2 weeks ago

@s77rt Let me confirm this error? It seems like we should fix the loading duration of the animations?

s77rt commented 2 weeks ago

@Anaslancer More specifically we are looking to understand why the app becomes laggy then fix it.

melvin-bot[bot] commented 1 week ago

@s77rt, @jliexpensify Eep! 4 days overdue now. Issues have feelings too...

jliexpensify commented 1 week ago

Not overdue, still no proposals

s77rt commented 1 week ago

Not overdue ^

mvtglobally commented 1 week ago

Issue not reproducible during KI retests. (Second week)

melvin-bot[bot] commented 1 week ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] commented 1 week ago

@s77rt, @jliexpensify Huh... This is 4 days overdue. Who can take care of this?

s77rt commented 1 week ago

Still looking for proposals

melvin-bot[bot] commented 5 days ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

mvtglobally commented 3 days ago

Issue not reproducible during KI retests. (Third week)

s77rt commented 3 days ago

Still looking for proposals

jliexpensify commented 1 day ago

@mountiny - coming back to this issue: what are your thoughts now? Should we close it, given it's been 3 weeks and no proposals?