Optimized version of LinkBuilder.slash() method for identifiers#1381
Open
mst-avaleo wants to merge 4 commits intospring-projects:mainfrom
Open
Optimized version of LinkBuilder.slash() method for identifiers#1381mst-avaleo wants to merge 4 commits intospring-projects:mainfrom
mst-avaleo wants to merge 4 commits intospring-projects:mainfrom
Conversation
Syncing master with upstream
merge master from origin repo
Refreshing forked repo
|
@mst-avaleo Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
|
@mst-avaleo Thank you for signing the Contributor License Agreement! |
2e02d7a to
856b6b9
Compare
5828e78 to
e643c37
Compare
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.
Hi,
I'm looking on performance of following code, since it's used heavily on collection resources for
selflinks in our projects,especially when collection is large.
I've found that
slash()method used behind the scene is a quite generic method, which can be used together with URL parts with many path segments and fragments (for example.slash("/segment/segment2#fragment")). Therefore there's a heavy URL processing in slash() methods used for this case. Though for the identifiers case, it's completely not needed in my opinion. Maybe I'm missing something...In the PR, I've proposed a solution, where there's a specific
slashId()method meant to be used only for identifiers. This enables to use simpler approach, where the input data doesn't need to be parsed from URL perspective. In result, the change gives around 20% of optimization when testing onEntityLinks.linkForItemResourcelevel.