genboy / Festival

Custom events plugin for Pocketmine
https://genboy.net/minecraft/festival/
Other
39 stars 15 forks source link

perm checking takes ALOT of time #262

Closed ghost closed 4 years ago

ghost commented 4 years ago

when i make an area use the player perms it takes him alot of time for the command to be executed and he has to like enter and leave enter and leave its just confusing and i couldn't find the exact way for it to work but if he is op it executes immediately, unlike if it wasn't on it executes immediately, and the area isn't big its around 14 blocks in total.

using version 2.1.0 master branch

genboy commented 4 years ago

Hi @mote166 thank you for posting this problem, i'll try to reproduce this to find and fix the problem. Could u give me the used pocketmine version and a list of installed plugins? Just incase, to cross check some issues etc. Thank you!

ghost commented 4 years ago

using pocketmine 3.11.3 plugins are private i can msg u the list on any other account u provide

ghost commented 4 years ago

any progress so far?

genboy commented 4 years ago

Yeah, I found some incorrect variables in the code that should be adjusted, I will be on it next couple of days.

I also noticed this function is using pocketmine's PlayerCommandPreprocessEvent function. I suppose that function heavely relies on server and internet speed (preprocessing the event) vs a simple clientside variable defining the player as op, making the difference in execution time. I'm not sure how many Festival users also have this problem, we should make it a good practice to also check the server CPU and memory while testing.

ghost commented 4 years ago

u know this is an important issue for me i have alot of things to add but im waiting for this to get fixed in order for them to work properly

genboy commented 4 years ago

Hi @mote166 could you test if the problem persists using dev #115 or dev #116

ghost commented 4 years ago

sorry for the late reply, yes issue still occur

genboy commented 4 years ago

Hi @mote166 can see if the server cpu goes up when this happens? Which permissions handling plugin is used in your setup?

ghost commented 4 years ago

yes it was 7% and when players were inside the area trying to teleport it jumped to 14%

ghost commented 4 years ago

i use pureperms latest version

ghost commented 4 years ago

any updates?

genboy commented 4 years ago

Hi @mote166, I've tested some combinations with pureperms and also had the cpu go up. Now a bit stuck looking into pureperms what code is combined and why it becomes laggy. To compare i should also test with some other permissionsplugin or native settings, if you can please do, then we can speed up the progress a bit, i'll be checking the other plugin code to compare. Sorry i could not make much time for this lately, I will try to make time this month to solve this.

ghost commented 4 years ago

sorry but i can't test other permission plugins since the server is public and people are on it 24/7

genboy commented 4 years ago

Issue reporter missing, problem not confirmed or solved