-
Notifications
You must be signed in to change notification settings - Fork 59
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
Improve transform perf #46
Improve transform perf #46
Conversation
This gave a 50% increase in performance for baseline chunktransformer transforms.
0352cd1
to
f284abb
Compare
Codecov Report
@@ Coverage Diff @@
## master #46 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 9 9
Lines 1199 1199
=====================================
Hits 1199 1199
Continue to review full report at Codecov.
|
f284abb
to
c69cbbd
Compare
Would you mind putting this against the GAPIC branch? Or should we just put this PR on hold until the conversion is finished? |
There's no rush. Let's wait for GAPIC |
@stephenplusplus This PR as well as #48 should now be unblocked |
src/mutation.js
Outdated
Mutation.convertFromBytes = function(bytes, options) { | ||
var buf = Buffer.from(bytes, 'base64'); | ||
var num = new Int64(buf).toNumber(); | ||
Mutation.convertFromBytes = function(bytes, options, isPossibleNumber) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Blocked on #35
General performance improvements for chunktransform
- Appropriate docs were updated (if necessary)For reference this is the file used to measure chunktransform benchmarks:
Before the first commit, this logged:
After the first commit it moved the emits/transforms to about 1000ms
After the second commit it dropped to be in the 450ms +/- 50ms
Note that the generating, encoding, and decoding times didn't change. I'm not too sure about how streaming services work with GAPIC (if they come in as encoded messages) which would make the decoding the real bottleneck (and which we don't technically control).
There's still some more work that can be done to increase transform speed, in particular the fact that a buffer can be holding a big number source and test, which is used for
Mutation.encodeSetCell
.Removing that bit puts the transform performance to be in the mid 300ms range. I'll follow up on this last bit in another issue or offline.