Repository navigation
Small improvements to payload generation - #1063
Merged
Merged
Conversation
arthurschreiber
commented
Mar 4, 2020
|
|
||
| * generateParameterData(parameter: Parameter, options: any) { | ||
| const buffer = new WritableTrackingBuffer(0); | ||
| const buffer = new WritableTrackingBuffer(1 + 2 + Buffer.byteLength(parameter.name, 'ucs-2') + 1); |
Collaborator
Author
There was a problem hiding this comment.
This ensures the Buffer used by WritableTrackingBuffer is big enough to contain the data that will be written to it without causing any resizing,
Collaborator
Author
|
CI build for Node.js 13.x is currently failing because of an incompatibility with one of the |
Codecov Report
@@ Coverage Diff @@
## master #1063 +/- ##
==========================================
+ Coverage 80.16% 80.63% +0.47%
==========================================
Files 86 86
Lines 4366 4374 +8
Branches 785 789 +4
==========================================
+ Hits 3500 3527 +27
+ Misses 614 587 -27
- Partials 252 260 +8
Continue to review full report at Codecov.
|
IanChokS
approved these changes
Mar 4, 2020
As the payload data is generated via a generator function, the buffering behavior for streams with `objectMode: false` does not seem to have any benefit.
Collaborator
Author
|
🎉 This PR is included in version 8.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This contains a few small improvements to the payload generation code that should slightly improve performance.