Android Developersowner
Discussion - Swimming in Threadpools
We know that you’re an awesome engineer, and you’re using threading to the MAX. But over time, it gets harder and harder to handle how work is distributed across all those AsyncTasks and HandlerThreads. It gets especially tricky when you try to break up large blocks of work, like image processing, and find a threaded solution for it.
https://goo.gl/Z2UlFp
#Perfmatters
We know that you’re an awesome engineer, and you’re using threading to the MAX. But over time, it gets harder and harder to handle how work is distributed across all those AsyncTasks and HandlerThreads. It gets especially tricky when you try to break up large blocks of work, like image processing, and find a threaded solution for it.
https://goo.gl/Z2UlFp
#Perfmatters
16
7

Hi, I've just watched you video about ThreadPools, so now I'm a little bit confused :). I checked my code, and I realised I use ExecutorService with CachedThreadPool.
I use it in an AsyncTask to process parts of a Json (I can't use Gson or something like this, because the Json has a terrible structure). I have about 90 objects I parse in separate threads, and I call awaitTermination() to wait all threads finish before finish doInBackground(). What do you think? This may be good in terms of performance?
I use it in an AsyncTask to process parts of a Json (I can't use Gson or something like this, because the Json has a terrible structure). I have about 90 objects I parse in separate threads, and I call awaitTermination() to wait all threads finish before finish doInBackground(). What do you think? This may be good in terms of performance?
Add a comment...






































