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

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

Ansible warning on jinja2 braces on when -

html - How to custom Bootstrap grid height? -