Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Extracted code to expand an URI toUriExpander
#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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
0c4bd87
to1bb619f
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
@nicolas-grekas thanks for the review. I addressed your comments |
Uh oh!
There was an error while loading.Please reload this page.
@lyrixx Can you fix the code :) |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
UriExpanderTrait
UriExpander
Thank you@lyrixx. |
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 aweb pages.ATM, we need to create a DomDocument, attach the href, and ask for thefull URL.This is a bit slow, and unecessary. This is why I extracted the minimalcode 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.42msCommits-------0c499c6 Extracted code to expand an URI to `UriExpanderTrait`
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: