I have an application in which I have a BarChart
and a CombinedChart
but they spend 1-1.5 seconds until they show the chart with the data.
I retrieve data from a database with Volley doing a request to get the data but I would like that the time that both charts spend to show the data will be reduced as much as possible.
I guess that it could be by the form of import that library to the project:
compile 'com.github.PhilJay:MPAndroidChart:v2.2.5'
but I could not find any other way to import that library or if it is the properly way to do this. Maybe it can be related by the fact that I am using Volley for this purpose.
What can I do to reduce the amount of time that both charts spend to show the data? Can it be something related with the form that I am importing it?
Any suggestion will be appreciated.
Thanks in advance!
The delay you are experiencing has nothing to do the way you are importing the libraries since that is done in compile time and not runtime.
If you are requesting data from a local database that's just the time it takes to fetch the data. If you are looking for speed I would recommend you to use Realm which is the fastest read "database" for android right now.
As a bonus the PhilJay has integrated his MPAAndroidChar
library directly with this,
you can find it here: MPAAndroidChart-Realm
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