MarkusBordihn / BOs-Easy-NPC

Create easily NPC for your world or for your mod.
Other
19 stars 7 forks source link

[Bug] Log spams after last update (4.3.3) #158

Closed remanam closed 5 months ago

remanam commented 5 months ago

I have 2 npc on server and every 5 minutes i see logs image

I think it's not normal and just spamming my logs

MarkusBordihn commented 5 months ago

Thanks for the feedback. It seems some mod on your server is regular saving or requesting to save the NPC data.

This could cause performance issues on the long term but is required by some other mods like pmmo.

I will change the log level for these messages to debug, but this will not solve the possible performance impact caused by some other mod.

remanam commented 5 months ago

thanks for good feedback too! is there a way to find what causes this ?

MarkusBordihn commented 5 months ago

You can try to use spark or any other Java Profiler to check if there is any impact and what is causing it.

lluiiz commented 5 months ago

Mine is having the same problem @remanam . If you discover which mod could be causing this, please share it with us.

lluiiz commented 5 months ago

I changed the time needed for the Minecraft auto-save and it adjusted the occurrence in the console as well. Could that be the problem? Also, I started to see some new messages, such as 'Define synced data,' 'Register default handler,' and 'Read additional save data.' imagem_2024-04-18_231104460

MarkusBordihn commented 5 months ago

I would auto-save not be consider a problem, if you need using auto-save in short intervals than there is nothing against it. However you should only use such short intervals if they are needed, otherwise the server needs to perform additional work for perform these saves in short intervals.

The shared messages like Define synced data ... are fine and by design, they will only show up once as soon an NPC is loaded in a chunk, so you should not see them every 5 minutes for the same NPC (same ID) compare to the "Add additional save ..." message.

If you see them several time for the same NPC (same ID) then something is wrong.

lluiiz commented 5 months ago

The auto-save feature is native to Minecraft; I didn't add it, I just changed the timing of its occurrence. I've noticed that every time the auto-save works, it generates the message Add additional save...

I also noticed that the Define synced data... message occurs more than once, even with the chunk already loaded, but it isn't as consistent as the Add additional save... message. In those messages, the coordinates state x=0.00, y=0.00, z=0.00, but I don't have any NPCs at those coordinates. Is this normal too?

MarkusBordihn commented 5 months ago

Thanks for the feedback I will move some additional do the debug level so they will not show up with auto-save. However I will not be able to disable all messages, because some of them are needed for troubleshooting and include important Information.

Add additional save ... happens when the NPC begins to spawn, so it's expected that the NPC has no position at this time because it was not spawned yet.