Some of the webpages I process in Jsoup are heavy. By โheavyโ, I mean that the page contains a lot of HTML (suppose that the page is already loaded), or it requires several iterations in one document (it is created only once through Jsoup.parse () ).
For this reason, I would like to present a progress bar to the user with an expectation of how much time is left.
One approach is to simply measure the amount of HTML (in KB or MB) and come up with a speed factor (unfortunately, it completely depends on the speed of the system in which this code works).
Another approach is to count the number of nodes ?
Due to the obvious deterministic nature of this, am I causing problems?
Ideas for the best ways to handle this?
source share