-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Optimize getSubmitToAccountID #83901
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
Merged
luacmartins
merged 17 commits into
Expensify:main
from
bernhardoj:chore/82427-optimize-getsubmittoaccountid
Mar 9, 2026
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0df5636
optimize getSubmitToAccountID
bernhardoj dcc164f
fix test
bernhardoj 1049693
lint
bernhardoj 895f137
fix wrong variable init
bernhardoj 65113c6
early exit when transactions are empty
bernhardoj c02d6ee
prettier
bernhardoj 55c0b2e
Merge branch 'main' into chore/82427-optimize-getsubmittoaccountid
bernhardoj 7f3d719
get the login/accountID without an array
bernhardoj f9fded9
add comment
bernhardoj 3abb360
add more perf test
bernhardoj 1b44f73
early exit if no category/tag approval rule
bernhardoj 3ad0fa6
reduce the number of inputs
bernhardoj c6a548b
lint
bernhardoj 24216d3
extract the code to a reusable function
bernhardoj bf5df52
update test
bernhardoj 3192047
Merge branch 'main' into chore/82427-optimize-getsubmittoaccountid
bernhardoj c31fe24
return -1 back as the fallback
bernhardoj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see that we use this function's return value to compare with the ownerAccountID at many places. If we return 0 as the default, that condition will become true for optimistic reports, as it defaults to 0 for ownerAccountIDs. Maybe the reason to use
-1here is to override that.