Tom's Simple Storage Mod (Fabric)

Tom's Simple Storage Mod (Fabric)

16M Downloads

Client and server side performance issuess

Grutschus opened this issue ยท 0 comments

commented

Hi Tom,

first of all: Awesome mod, keep up the great work.

While playing on a server with my friends I have noticed performance issues with your mod.
When opening the Crafting Terminal of a larger system both server and client start to lag for me, while it is open.
On the server side it looks like the ItemFilterHandler takes most of the CPU: https://spark.lucko.me/s5lCU4IjJI
On the client side I am not sure: https://spark.lucko.me/s5lCU4IjJI

Any help is appreciated!

EDIT:
I have had a closer look at the results of the profiler and it pointed to this line.
If I understand the code correctly, the complete network is scanned every single tick by this IntStream. It does make total sense that this operation therefore takes a toll on the CPU. It appears to me however that this operation is done sequentially, is that correct?
Could this be parallelized by turning the IntStream into a parallelized IntStream?

Note that I have no experience in mod development or Java development, whatsoever. I am just trying to help with the little knowledge I have :) Feel free to correct me!