title: Libgdx for loop lag
body: <p>I have problems with my game. The game runs ok until the time where I have to reposition the objects, which happens every frame. For example here I have to reposition some parked cars (around 6 cars on each side of the road), the cars are constantly moving down in the screen, then they reset and reposition at the top again. I have used Poolable to save resources. However, the game is still very jumpy when it comes to running these lines of code. Is there any way I could improve the code to prevent lag? Maybe a new thread? If so how would be the right way of creating a new thread and updating it every frame.</p>
  
  <pre><code>private void updateParkedVehicles(float delta){
      for (int i = 0; i &lt; parkedCarLeft1Array.size; i++){
          parkedCarLeft1Array.get(i).update(delta);
  
          for (int c = 0; c &lt; parkedCarLeft1Array.size; c++){
              if (c != i){
                  if (Intersector.overlaps(parkedCarLeft1Array.get(i).bounds, parkedCarLeft1Array.get(c).bounds)){
                      parkedCarLeft1Array.get(i).reset();
  
                  }
              }
          }
      }
  
  
      for (int i = 0; i &lt; parkedCarRight1Array.size; i++){
          parkedCarRight1Array.get(i).update(delta);
  
          for (int c = 0; c &lt; parkedCarRight1Array.size; c++){
              if (c != i){
                  if (Intersector.overlaps(parkedCarRight1Array.get(i).bounds, parkedCarRight1Array.get(c).bounds)){parkedCarRight1Array.get(i).reset();
                  }
              }
          }
      }
  
  }
  </code></pre>