apps-android-wikipedia icon indicating copy to clipboard operation
apps-android-wikipedia copied to clipboard

Use Jsoup's stream implementation

Open Isira-Seneviratne opened this issue 1 year ago • 2 comments

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

Isira-Seneviratne avatar May 20 '24 03:05 Isira-Seneviratne

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

dbrant avatar May 20 '24 03:05 dbrant

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.

Isira-Seneviratne avatar May 20 '24 04:05 Isira-Seneviratne

A bit of profiling shows no difference in performance.

dbrant avatar Aug 21 '24 14:08 dbrant