Repository navigation
Move argument length requirement checks to a shared function to dedupe code - #1563
Merged
kossnocorp merged 1 commit intoJan 4, 2020
Merged
Conversation
Member
|
I like it very much. Thank you for such great work! I considered making this change but was afraid that arguments leaking could affect the performance. I've run benchmarks, and it turned out that it's not a problem anymore. I have a question, why did you choose to create a function before calling it inside of |
Contributor
Author
|
@kossnocorp haha good point, originally I was planning to reuse instances but never came across for a need for it. Will simplify and update! |
Member
|
Thank you so much! I'll ship it with the next release once you update it. |
levibuzolic
force-pushed
the
required-args-optimisation
branch
from
January 4, 2020 00:24
36cac26 to
b647987
Compare
…e code. I noticed in a compiled bundle that there were a lot of duplicated strings which were used for argument length validation, so I was interested to see what effect deduplicating these would have on bundle size. Bundle | Bytes -------|-------- Before | `25474` Ater | `24528` That's a reduction of 946 bytes (3.71%) from a complete minified bundle.
levibuzolic
force-pushed
the
required-args-optimisation
branch
from
January 4, 2020 00:26
b647987 to
bc1a023
Compare
Contributor
Author
|
@kossnocorp updated, thanks for the feedback. 👍 |
This was referenced Feb 18, 2020
This was referenced Mar 12, 2020
This was referenced Apr 2, 2020
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.
I noticed in a compiled bundle that there were a lot of duplicated strings which were used for argument length validation, so I was interested to see what effect deduplicating these would have on bundle size.
2547424528That's a reduction of 946 bytes (3.71%) from a complete minified bundle.