This PR improves the performance of the Tycoon mod by 10.7%. I changed repeat lookups of items in supply buildings into a util function that aggregates the resources of all items in a list of supply buildings.
Ran the same save for 10 minutes. On this branch the profiler said that tycoon used 412ms, while on main it was 461ms.
This PR improves the performance of the Tycoon mod by 10.7%. I changed repeat lookups of items in supply buildings into a util function that aggregates the resources of all items in a list of supply buildings.
Ran the same save for 10 minutes. On this branch the profiler said that tycoon used 412ms, while on main it was 461ms.