Skip to content
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

Don't extract data URIs #423

Merged
merged 4 commits into from
Aug 2, 2021
Merged

Don't extract data URIs #423

merged 4 commits into from
Aug 2, 2021

Conversation

ato
Copy link
Collaborator

@ato ato commented Jul 30, 2021

Partially addresses #422 by changing the outlink helper methods in the Extractor base class to ignore data URIs. Since data URIs can be very large this also tries to avoid copying them to the heap as Strings when possible.

@ato ato requested a review from kris-sigur July 30, 2021 06:46
ato added 3 commits July 30, 2021 15:57
Data URIs can be very large. ExtractorHTML mostly works with off-heap
CharSequences so by delaying the conversion of outlinks to strings
until after filtering out data URIs we can potentially avoid some
very large String allocations.
@kris-sigur
Copy link
Collaborator

Looks fine. Good catch on the extractors bypassing "the" extractor.

@ato ato merged commit eb67cfb into master Aug 2, 2021
@ato ato deleted the dont-extract-data-uris branch August 2, 2021 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants