bahrmichael / factorio-tycoon

GNU General Public License v3.0
10 stars 7 forks source link

chore: improve performance by aggregating supply building access #303

Closed bahrmichael closed 8 months ago

bahrmichael commented 8 months ago

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.