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

[HOLD for payment 2024-06-28] [LOW] [Perfromance] Unnecessary calls of triggerUnreadUpdate method #43276

Closed
mountiny opened this issue Jun 7, 2024 · 18 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@mountiny
Copy link
Contributor

mountiny commented Jun 7, 2024

Coming from Slack.

There were a couple of places where there was a noticeable delay in the response of the UI. I will log this as CRITICAL because it works so randomly that I think this is not only performance issue but UX reliability.
unfortunately, in the video, you cannot see when I press the buttons to see the delay

  1. Click + in the compose - 11second
  2. DELAY 1 Opening the bottom drawer modal
  3. 47 second after adding the amount and currency there is a delay populating it in the transaction thread
  4. BUG: 57 second - Added a merchant and the Amount got cleared up 😡
  5. DELAY 2 - 1:04 When I have opened the amount page again, the page was not responsive for good 4 seconds, you can see the currency opened at 1:10 and then the numbers I pressed before were in the amount.
  6. There is no API call on that page I think, what was the UI hang up on? Even if there is a READ call, it should not cause the UI slowdown
  7. BUG 2 - 1:18 saving the amount cleared the merchant again 😡
  8. Logs and video in the Slack thread
Issue OwnerCurrent Issue Owner: @puneetlath
@mountiny mountiny added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 7, 2024
@mountiny mountiny self-assigned this Jun 7, 2024
Copy link

melvin-bot bot commented Jun 7, 2024

Triggered auto assignment to @puneetlath (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.

@OlimpiaZurek
Copy link
Contributor

Hi. I'm Olimpia from Callstack. I would like to work on this issue.

@mountiny
Copy link
Contributor Author

@OlimpiaZurek Any update for this one? What would be your next steps and ETA?

Lets try to make many small improvements iteratively so we do not wait for one bigger PR

@melvin-bot melvin-bot bot removed the Overdue label Jun 10, 2024
@OlimpiaZurek
Copy link
Contributor

Not much progress here. Today I was investigating a reassure performance issue in PR related to Onyx bump.

@melvin-bot melvin-bot bot added the Overdue label Jun 12, 2024
@mountiny
Copy link
Contributor Author

let us know if you have any updates

@melvin-bot melvin-bot bot removed the Overdue label Jun 12, 2024
@OlimpiaZurek
Copy link
Contributor

Today I started looking into potential improvements to this method

@OlimpiaZurek
Copy link
Contributor

Daily update: I’ve been investigating how we can improve the triggerUnreadUpdate() method. By adding debouncing and some memoization, we can reduce the number of calls to this function. I’m working on the draft PR.

@mountiny
Copy link
Contributor Author

PR merged 🚀

@OlimpiaZurek Do you expect more changes to reduce the number of calls even further

@OlimpiaZurek
Copy link
Contributor

I'm planning to check if there is more room for improvement here.

@OlimpiaZurek
Copy link
Contributor

It appears that after applying the changes, the function is only called when the navigation state changes, which is the expected behavior. I didn't detect any unnecessary calls, so I think we can close this issue as resolved

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 21, 2024
@melvin-bot melvin-bot bot changed the title [LOW] [Perfromance] Unnecessary calls of triggerUnreadUpdate method [HOLD for payment 2024-06-28] [LOW] [Perfromance] Unnecessary calls of triggerUnreadUpdate method Jun 21, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 21, 2024
Copy link

melvin-bot bot commented Jun 21, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Jun 21, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.0-9 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-06-28. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jun 21, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@DylanDylann] The PR that introduced the bug has been identified. Link to the PR:
  • [@DylanDylann] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@DylanDylann] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@DylanDylann] Determine if we should create a regression test for this bug.
  • [@DylanDylann] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 28, 2024
Copy link

melvin-bot bot commented Jun 28, 2024

Payment Summary

Upwork Job

  • Contributor: @OlimpiaZurek is from an agency-contributor and not due payment
  • ROLE: @DylanDylann paid $250 via Upwork (LINK)

BugZero Checklist (@puneetlath)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@puneetlath
Copy link
Contributor

@DylanDylann sent you an offer here: https://www.upwork.com/nx/wm/offer/102918311

Ping me on this issue when you've accepted.

@melvin-bot melvin-bot bot added the Overdue label Jul 1, 2024
@puneetlath
Copy link
Contributor

@DylanDylann bump.

@melvin-bot melvin-bot bot removed the Overdue label Jul 1, 2024
@DylanDylann
Copy link
Contributor

@puneetlath I accepted, thanks 🚀

@puneetlath
Copy link
Contributor

Paid. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
Development

No branches or pull requests

4 participants