-
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
[HOLD for payment 2024-07-24] [$500] Chat - Bad performance when opening, closing or zooming big image #38180
Comments
Triggered auto assignment to @mallenexpensify ( |
@mallenexpensify 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 |
We think that this bug might be related to #vip-vsp |
Check on in vip-vsb |
@mallenexpensify Huh... This is 4 days overdue. Who can take care of this? |
Adding to #vip-vsb since it's a bug that doesn't involve money. |
Bumping to weekly while we await a status update |
Job added to Upwork: https://www.upwork.com/jobs/~0184b3ab8ca5055856 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane ( |
I think/hope this can be External. @sobitneupane , let me know if you disagree. |
@mallenexpensify I do agree. I think this can be handled externally. |
ProposalPlease re-state the problem that we are trying to solve in this issue.We can see some performance issues with images, like when using high resolution images. What is the root cause of that problem?Images which have too high resolution show bad performance since the render time increases and tasks such as zoom also become heavy. For example, the below image is 9001x9000. In the validation logic, we are not checking this. App/src/components/AttachmentModal.tsx Lines 314 to 356 in ed7029b
What changes do you think we should make in order to solve the problem?Add the below logic after we get
Above code can be polished. Note that we are only changing the inputSource and not the updatedFile. So, only the preview in the modal gets changed. Then, we can also show a message saying that the preview is of low quality than expected, and original image can be seen by downloading (UX to be decided by design team).
UI above can be polished. Also, we'll need to ensure that the preview fits in the modal.
What alternative solution did you explore?Old solutionWe can check if the image being uploaded has a high resolution. If yes, then we'll compress it before uploading. Add the below code after checking if it's a valid file: App/src/components/AttachmentModal.tsx Lines 327 to 330 in ed7029b
Pseudo code (we can polish it):
Above logic compresses the image by 50% only if it exceeds 4096 in height/width. This would decrease the image quality, but that should be fine because the image in such cases would mostly already be high quality. Note that I have tested the heavy image with the above compression logic, and it is working well. Screen.Recording.2024-04-16.at.4.40.10.PM.mov |
@sobitneupane The PR is ready for your review. The translation in slack is not confirmed yet. https://expensify.slack.com/archives/C01GTK53T8Q/p1719953316322399 |
PR still lin review, I'm bumping it today. Translation was approved. |
PR merged, awaiting deployment 🎉 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.7-8 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-07-24. 🎊 For reference, here are some details about the assignees on this issue:
|
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:
|
@sobitneupane plz complete the BZ checklist above. |
Contributor: @wildan-m paid $500 via Upwork @sobitneupane plz complete the BZ checklist above. |
Rather than a bug, it is a performance issue. |
Regression Test Proposal
Do we agree 👍 or 👎 |
@sobitneupane I think that is good, but lets add a case for downloading the image. |
@Julesssss Updated. |
$500 approved for @sobitneupane |
Thanks @sobitneupane, test case created |
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.51-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4418462
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
Pre-requisite: the user must be logged in
Expected Result:
There should be no performance issues when opening, zooming or closing big images
Actual Result:
The behavior of the app gets slower when opening, zooming or closing the big image
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6411486_1710273467163.bandicam_2024-03-12_15-48-26-231.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @sobitneupaneThe text was updated successfully, but these errors were encountered: