I am working on async task. When i call execute() on async task it takes 1 second to call doInBackground() method of async task which I don’t want. Does anyone knows how to reduce that time?
I am working on async task. When i call execute() on async task it
Share
Such things are up to the System. Never assume anything about timing when working multithreaded!
Anyways, if your AsyncTask repeatedly does the same work, try using an ExecutorService which gets a Runnable as argument. The ExecutorServices don’t destroy the created threads automatically but try to re-use it. That way the starttime might be reduced.