Map events #60/#61 are implemented very inefficiently
Bug #992109 reported by
DCoder DCoder
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ares |
Fix Released
|
Medium
|
AlexB |
Bug Description
These two events use highly inefficient logic to reach their goals. Every frame they recalculate which of the 600+ TechnoTypes is in the condition (waste of time - this answer is not going to change in the middle of the game) and then count the instances of that TechnoType in the global TechnoClass::Array .
Changing them to precompute the wanted conditional TechnoType at match start and then summing the amount of that type each HouseClass has would bring this down from a waste of time to a compact and acceptably fast check.
Changed in ares: | |
assignee: | nobody → DCoder DCoder (dcoder1337) |
importance: | Low → Medium |
status: | Confirmed → In Progress |
Changed in ares: | |
assignee: | DCoder DCoder (dcoder1337) → AlexB (alexander-b) |
milestone: | none → 0.2-rc1 |
Changed in ares: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
Well, they do seem to work. I'm going to do more tests for lag though.