-
Notifications
You must be signed in to change notification settings - Fork 37
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
Sync performance fixes #1921
Sync performance fixes #1921
Conversation
end | ||
end | ||
|
||
# this is performance-critical code, be careful while refactoring it |
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.
Let's link to the issue in this comment too.
@@ -90,5 +92,13 @@ def sync_region_modified? | |||
return if process_token[:sync_region_id].blank? | |||
process_token[:sync_region_id] != requested_sync_region_id | |||
end | |||
|
|||
def time(method_name, &block) | |||
raise ArgumentError, "You must supply a block" unless block |
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.
Is this necessary? Can we just let the yield
below blow up with a Block not provided
?
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.
Oh, right, of course 👍🏼
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 think we've done a ton of research and test driving of these changes. They look good!
I have one crazy idea - what happens if we replace current_facility_records
and other_facility_records
with current_facility_records
and all_facility_records
?
Sure, we'll be sending the current facility records twice, but is that worth it - given the alternative is a gnarly codepath that requires cautionary comments and performance observation every time we touch it?
Story card: 2086
Because
We discovered that the perf improvements for block level sync tend to slow down FG syncing. We reverted the improvements (#1920) to unblock deploys while a fix was figured out.
This addresses
This combines the reverted perf improvements (#1898 and #1897) and fixes them to be FG compatible.
Note
Please use #1926 as reference for the changes here.