Shopkeepers

Shopkeepers

2M Downloads

Sign shops and lot's of BlockPhysicsEvents = bad performance

blablubbabcDEV opened this issue ยท 3 comments

commented

Migrated from: https://dev.bukkit.org/projects/shopkeepers/issues/385

Originally posted by FreddyGB (Apr 6, 2016):

Edit: Added previous comment to this ticket:
Hello, i am having a problem with this plugin, a pretty big one aswell, so, basically the plugin is having a memory leakage, i checked from the /timings merged command, and it had the most time running or whatever, but is there any way u can make a patch for that, its eating my memory super quickly, and i dont want to always pay for memory, since it costs a lot. Thank you - FreddyGBU asked me for the timings and here you are:http://pastebin.com/yjn3rYfJalso, those questions i cant really answer since im using a host, but i know i have 1024 MB ram, if that comes in handy
thank you.

commented

Originally commented by blablubbabc (May 1, 2016):

I will decline this for now as I don't seen any good alternative in handling sign shops currently. As already mentioned: If they are causing a huge issue on your server, you can disable them in the config.

commented

Originally commented by blablubbabc (Apr 6, 2016):

Your timings show an execessive amount of BlockPhysicsEvents being triggered on your server (more than players could trigger manually). I assume you might have an excessive amount of redstone clocks (and similar loops) going on on your server.
Shopkeepers reacts to BlockPhysicsEvents to check if a shop sign is involved and then prevents it from breaking. In your timings report you can see that shopkeepers is only taking very little time for handling each of those BlockPhysicsEvents (178), but as your server is triggering so many of them (114343326!) it sums up to a lot more..

As you can see in your timings report, your other plugins handling this event as well show similar timings: See WarpPortals.
I don't know if there is anything I can do about this.. Not reacting to this event would possibly make sign shops vulnerable to exploits of players somehow being able to get the sign of other player's sign shops into a state in which it would normally break.

However, if you insist on having that many redstone loops active on your server, and this is causing a performance issue for your server, then you can disable sign shops in the config. This will also disable the related event handler as well, so your timings will look normal again.

Regarding the mentioned memory leak: From the given information I can't see anything which would indicate a memory leak caused by shopkeepers on your server.

However, without much knowledge about actual memory requirements of shopkeepers, I would like to note that high memory consumption and a memory leak are two different things, and with only 1GB of memory I wouldn't wonder if a minecraft server with plugins actually hits that limit fairly fast.

        Edited Apr 6, 2016
commented

Originally closed by blablubbabc (May 1, 2016)