java - Increase the performance of this code -
is there way increase performance of following for
loops:
for(string s : lista){ for(string s1 : listb){ for(string s2 : listc){ //api call } } }
i doing api call in inner loop. each time has call api , causing performance issue. there simple way can achieve without performance issue of using libraries?
instead of calling api in loop, try instead adding details of necessary api call queue
. use multiple threads process queue.
obviously same total time taken, loop should complete earlier. remember loop completing no longer mean api calls done.
Comments
Post a Comment