MattiDragon / ExtendedDrawers

Adds drawers and more
Other
6 stars 14 forks source link

[Bug]: The chunk checking make a lot of lag #33

Closed Gromatou closed 1 year ago

Gromatou commented 1 year ago

Description of the issue

The mod check all time we generate or visit a chunk if there are a drawer in it, but scan the chunk is the wrong way and thats useless profiler in a modpack https://spark.lucko.me/qqepiR9d12 34% of cpu usage profiler with no other mods https://spark.lucko.me/BHJwlaZJdb 14% of cpu usage image

Reproduction steps

just launch a spark profiler and visit some chunk

Mod version

1.3.5 (i've try the 1.3.4 but thats the same)

Operating System

windows 10

Minecraft version

1.18.2

Other mods

in the modpack : [22:31:39] [main/INFO]: Loading 223 mods:

Server

Happens

Client

Happens

Logs

no any log

Extra Context

No response

MattiDragon commented 1 year ago

There's a config option for it for a reason. Older versions of the mod didn't store networks and instead calculated them on each interaction, which caused lag. To make updating smooth I added a feature that looks for network components without a network and fixes them. You can safely disable it if you don't have really old networks that haven't been loaded.

Gromatou commented 1 year ago

okay, why this option is not disable by deffaut ?

MattiDragon commented 1 year ago

Because people with old worlds wouldn't have it then. I'll probably remove it with the 1.19.3 update