whimxiqal / journey

A server-side path-finding Minecraft plugin
MIT License
15 stars 2 forks source link

Lag spike after long path is calculated. #37

Closed TheDeafCreeper closed 1 year ago

TheDeafCreeper commented 1 year ago

Strangest part is that according to spark, TPS dips but MSPT does not spike.

It also does not appear to be the plugin creating the path as the particles already exist when it starts lagging, maybe it's when it cleans up stuff?

(Relevant Spark Timing) image

Server Version: git-Purpur-1838 (MC: 1.19.2) Plugin Version: 1.0.2

whimxiqal commented 1 year ago

Looks like there's lots of time used when sending the path data to the cache database. Idk why that's scheduled on the main thread. This would also be fixed with #33 with better parallelization in general and, although not as relevant here, database pooling

whimxiqal commented 1 year ago

The database call is made async now with #47 for v1.1