I am using the all String version of Jsoup.parse():
parse(String html, String baseUri)
Ruling out connectivity speed for benchmarking its performance.
On a typical low-end Android phone, calling Jsoup.parse()
on the html String of a not-so-rare long Wikipedia page (~600KB), takes 9 seconds!
My client is not willing to accept this delay and I am thinking of either dumping Jsoup for a different engine, parsing web pages myself (still in Java), or using some C/C++ parser in NDK (if available).
But I prefer continuing to use Jsoup as much as possible.
Is there a way to speed up Jsoup.parse()
?
What I try to do myself with big pages (if it's possible and you only want some information on the page) is try to minimize the text to parse identifying previously the regions that you want and then parse wanted regions with JSoup.
That way you can combine your own parsing in Java to reduce data and then use JSoup for commodity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With