MoonflowerTeam / pollen

⚙️ Library for all Moonflower mods. Adds bridges for Fabric and Forge using Architectury along with utilities such as our Pinwheel bedrock animation API.
https://www.curseforge.com/minecraft/mc-mods/pollen
Other
32 stars 19 forks source link

[1.18.2 Performance] Spark reporting high MSPT from Pollen #40

Closed itsdinkd closed 2 years ago

itsdinkd commented 2 years ago

What version are you seeing the problem on?

1.18.2

Describe the issue

Run Spark profiler in server with people
See results

latest.log

https://spark.lucko.me/p4J2fXnR6v?hl=16483,20079,26303,32576,34625,36688,38414,40907,42761,44224,45189,46209,46683,47565,48464,49110,49859,50644,51381,52756,53219,53582,54597,54998,55475,55766,56007,56273,56638,56989,57420,57662,57742,57864,57971,76435,6047
Ocelot5836 commented 2 years ago

According to the profiling you gave Pollen events are taking a tiny fraction of a tick, even after considering all events. It takes up a reasonable amount of time per tick only if listeners are registered to events.

itsdinkd commented 2 years ago

According to the profiling you gave Pollen events are taking a tiny fraction of a tick, even after considering all events. It takes up a reasonable amount of time per tick only if listeners are registered to events.

??? It took 3944 ms which is 78 ticks.

Ocelot5836 commented 2 years ago

Spark reports the total time is 438027ms, which is 21901 ticks total. That means 3944ms is literally 0.9% of the tick time. It takes more time to tick animal movement (5033ms) than invoke events.

itsdinkd commented 2 years ago

I see what you mean now. Thanks for clarifying

Ocelot5836 commented 2 years ago

np