Repository navigation
[NOQA] Split receipt capture time into camera and file write - #105754
Conversation
|
@codex review |
|
@MelvinBot review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ReviewThe change looks correct and safe. The span still starts and ends in the same place, and the other
I did not run a web test. This change only touches the native camera path, so a web build can't exercise it. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@bernhardoj Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safarilog.mp4 |
mountiny
left a comment
There was a problem hiding this comment.
Thanks @OlimpiaZurek @bernhardoj
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.33-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.5.33-1 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
ManualReceiptCapturemeasures one block: the camera taking the receipt and the file being written to disk. Since VisionCamera v5, every iOS scan takes a full photo, and iOS capture p95 went from ~210ms to ~630ms. We can't tell from the span whether that time is in the camera or in the file write, and the possible fixes are different for each.This PR records the two parts separately and adds them to the span:
capture_duration_ms: from the capture call until the camera returns the image (capturePhotoortakeSnapshot)save_duration_ms: writing that image to disk (saveToFileAsync), not counting the folder creation before it, so photos and snapshots measure the same workBoth capture paths report them: full photos (iOS, Android flash and landscape) and Android snapshots. Nothing changes for the user, and the span starts and ends in the same place.
Both values are measured from JS and rounded to whole milliseconds, so they also include any delay before the JS thread handles the result. That's enough to tell camera time from file time.
Fixed Issues
$ #105823
PROPOSAL: N/A
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari