Streamline and improve performance for orderable sls version parsing #1185
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.
Before this PR
When parsing an orderable sls version, we're doing up to 4 parsing of the same string (one for each version type), which is fairly inefficient and leads to extra code as well.
We've also implemented a dedicated, more optimized version parser for release versions in #463, which can be easily extended to the other version types, but for these we're still relying on the basic regex parsing.
After this PR
==COMMIT_MSG==
Streamline orderable sls version parsing
==COMMIT_MSG==
Performance comparison shows high improvements on both speed and memory allocations for non-release version parsing. Specifically surfacing these:
See complete JMH results below:
Before (as of #1183)
After
This PR also removes a few now-unnecessary package-private classes
Possible downsides?