-
Notifications
You must be signed in to change notification settings - Fork 2.2k
refactor: try to speed up update content hash #3045
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3045 +/- ##
=======================================
Coverage 89.35% 89.35%
=======================================
Files 141 141
Lines 9489 9483 -6
=======================================
- Hits 8479 8474 -5
+ Misses 1010 1009 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Latency summaryCurrent PR yields:
Breakdown
Backed by latency-tracking. Further commits will update this comment. |
if this is true and brings more efficiency, then we should replace it globally |
it is true link, checking if it brings more efficiency |
match on 200 random docs avg time not significant performance increase, speed up 15% percent, similar as what we got in the profiling tool, 10-15 percent speed up. |
the idea:
update_content_hash
, we actually never change parameters, soinclude_fields
never being used except test. We also get rid of the mutually exclusive check.exclude_fields
,but specifyfields
necessary for hashing, saferCopyFrom
andFieldMask
is expensive, we manage to only useFieldMask
without creating theempty_proto
SerializeToString
=SerializePartialToString
+ check if message is initialised, we initialise the pb message in the first line of the method, so checking is unnecessary please refer to here.