The same code in my project has different execution duration for the same input parameters, it varies from 1ms to 30ms.
private void link(Array values, Area area){
values.add(area);
Array<Area> children = area.getChildren();
for (int i=0; i<children.size; i++){
Area child = children.get(i);
link(values, child);
}
}
This lags are inappropriate. Can I fix them?
Intermittent lags are caused by garbage collection.