Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do external libraries make apps slower?

I am building an app that scrapes information from web pages. To do that I have chosen to use an html scraper called Jsoup because it's so simple to use. Jsoup is also dependent on Apache Commons Lang libray. (Together they make up a total of 385kB ). So Jsoup will be used to Download the page and parse it.

My question is if the use of these simplifying libraries, instead of using Androids built-in libraries, will make my app slower? (in terms of downloading data and parsing).

I was thinking that the internal libraries would be optimized for Android.

like image 853
droidgren Avatar asked Aug 10 '10 19:08

droidgren


1 Answers

The next release of jsoup will not require Apache Commons-Lang or any other external dependencies, which brings down the jar size to around 115K.

Internally, jsoup uses standard Java libraries (URL connection, HashMap etc) which are going to be reasonably well Android optimised.

I've spent a good amount of time optimising jsoup's parse execution time and data extractor methods; and certainly if you find any ways to improve it, I'm all ears.

like image 197
Jonathan Hedley Avatar answered Sep 27 '22 20:09

Jonathan Hedley