-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Extracted code to expand an URI to UriExpander
#35415
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
Merged
Merged
Conversation
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
0c4bd87
to
1bb619f
Compare
OskarStark
reviewed
Jan 21, 2020
src/Symfony/Component/DomCrawler/Tests/UriExpanderTraitTest.php
Outdated
Show resolved
Hide resolved
@nicolas-grekas thanks for the review. I addressed your comments |
ro0NL
reviewed
Jan 30, 2020
@lyrixx Can you fix the code :) |
fabpot
reviewed
Feb 4, 2020
fabpot
requested changes
Feb 4, 2020
UriExpanderTrait
UriExpander
fabpot
approved these changes
Feb 4, 2020
Thank you @lyrixx. |
fabpot
added a commit
that referenced
this pull request
Feb 4, 2020
This PR was merged into the 5.1-dev branch. Discussion ---------- Extracted code to expand an URI to `UriExpander` | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | | License | MIT | Doc PR | When building a crawler we need to extract and to expand all links on a web pages. ATM, we need to create a DomDocument, attach the href, and ask for the full URL. This is a bit slow, and unecessary. This is why I extracted the minimal code to expand the URL to its onw trait for better re-usability. I benched (a specific part of) my application: * before: 2.16ms * after: 1.42ms Commits ------- 0c499c6 Extracted code to expand an URI to `UriExpanderTrait`
Merged
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.
When building a crawler we need to extract and to expand all links on a
web pages.
ATM, we need to create a DomDocument, attach the href, and ask for the
full URL.
This is a bit slow, and unecessary. This is why I extracted the minimal
code to expand the URL to its onw trait for better re-usability.
I benched (a specific part of) my application: