Closed vpmalley closed 9 years ago
Following some perf measurements, it appears the times are as follows: network access : ~ 300 ms save to DB and refresh UI : ~ 1300 ms, up to 5s when adding the feed and previous feeds exist.
Also, there does not seem to be more than 2 threads used (at most the UI thread and one for network accesses).
Therefore multiple things should be done:
The save to DB is now wrapped in asynchronous tasks, it is better. What made a difference is to reduce the workload for the UI thread, so saving to DB was a first step. A second step was to reduce the number of refreshes of the view were done, now with a hack only one is done, no matter the number of feeds added.
A third step, to do, is to reduce even more the workload on the UI thread by reading from the DB in an AsyncTask. It would put another second off the UI thread.
moved the load from DB to an async task. The UI now looks good enough.
Currently the retrieval of feeds is very slow and it is growing with the number of sources (so the requests might not be parallelized).