Separate names with a comma.
Comments in 'Plugin Development' started by Nawaf_Craft1b, Jan 12, 2016.
do plenty of cause code lagg For MiniGames Plugin
How we can know what's the problem if we didn't see the code?
PocketMine itself contains 70000+ lines of code.
What does lag mean? It means that server is busy executing something.
If your plugin is poorly written with little thought being put into, or you simply don't understand it, it is very likely to cause major lag just from one line of code. Even professional plugins like ServerAuth by @EvolSoft is having such a problem (but fixed now ) just because of carelessness on one line of code.
THX For your post
Don't take the shortcuts boi xD
Hm.... Just take the credit. You did it, not @EvolSoft
I remember an time where i liked to use sleep(10); for debug... After some time the plugin was finished so I removed all vardumps, debug messages, sleeps... (That plugin is an ServerCore wich is still in use on my server) But i forgot to remove one single sleep(10); on the command /spawn and yes... I didn't find it for ages...
So, you have too much lag:
The first help:
1. Compression should be executed in async-tasks.
2. Set async-workers way over your core number (I have 4 cores (8 threads) and have entered 16)
3. Compression should be lowered (I have max, because of my very slow internet connection)
4. Check your Chunk stuff
5. execute /gc with time commander (1 min)
do a timings report with that garbage collector and time commander running every minute fills the entire memory and lags server
If you are using things properly, number of async workers doesn't matter that much.