Slimefun-Addon-Community / Supreme

An addon for slimefun
GNU General Public License v3.0
6 stars 20 forks source link

TechGenerator Performance #46

Closed Sefiraat closed 1 year ago

Sefiraat commented 1 year ago

Makes TechGenerator tick async. I cannot see any non-thread safe actions while ticking so should be ok. Testing didn't cause any noticeable issues.

Also tweaked some small things to generate variables only when they are sure to be needed. Ran 5 machines with max zombies for 5 mins.

Before: 16ms on main thread

image

After: 12ms on Scheduler thread

image

I have not had the pleasure to be able to play with Supreme, so it would be wise for someone who knows it better than I do to test this build in case I have missed anything.

Note: This class clearly needs a lot of work, this will not really fix the performance issues, only stop them effecting TPS. So I think a fuller review should be undertaken.

Sefi