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

Use Jsoup's stream implementation #4682

Closed

Conversation

Isira-Seneviratne
Copy link
Contributor

Use Jsoup's custom stream implementation for lazy evaluation of HTML elements.

@dbrant
Copy link
Member

dbrant commented May 20, 2024

Could you be more specific about why this is an improvement?

@Isira-Seneviratne
Copy link
Contributor Author

Isira-Seneviratne commented May 20, 2024

Could you be more specific about why this is an improvement?

The select method that was being used earlier retrieves all the HTML elements at once. This change retrieves them one by one, which would improve performance when there are a lot of elements.

@dbrant
Copy link
Member

dbrant commented Aug 21, 2024

A bit of profiling shows no difference in performance.

@dbrant dbrant closed this Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants