Hi all,
I have a forloop which loops through an ArrayList full of Entities.
What the for loop does is that it loops through the arraylist, obtains the Entity from the arraylist, then does a Entity.Hashmap.get(arg_name); if its true, then break.
So here it is in code:
public void getEntity(Spatial s) {
String name = s.getName();
for (int i = 0; i < entityArrayList.size(); i++) {
Entity t = (Entity) entityArrayList.get(i);
boolean hasName = t.containsSpatialName(name);
if (hasName == true) break;
}
}
Thats all it does. The only problem is that its in the same thread as the renderer (and I dont whish to change that). The ArrayList will by large have around at max 5000 Entities and I was wondering how fast this is and how large of an FPS hit would I have to bear.
Thx, DP