Plugin freezing serverSolved
Hello. The problem appeared after one of last updates. AdminRadar started to freeze server for 2-5 sec. In console last info about it:
Calling 'OnEntitySpawned' on 'AdminRadar v4.5.3' took average 7211ms
Calling 'CanNetworkTo' on 'AdminRadar v4.5.3' took average 4523ms
Calling 'OnEntityKill' on 'AdminRadar v4.5.3' took average 2683ms
And after command o.reload AdminRadar server crashes.
It's really useful plugin for admin, and there are great functions in last versions. But it's too heavy for server. Can it be fixed somehow? I dont think that this problem just for my server..
Can you give me the stats on your server, the amount of players online when this happened, and the entity count? Also please attach your config.
Online players were about 15, + - few. Entity 42500, if i understood correctly, i dont remember if there was a command about entity.
Here is link with .json
https://yadi.sk/d/uRWVxh1iXy_Y_Q
Everything looks to be in working order in the config. I'm just not seeing anything that would cause this to happen. Map markers are handled in a coroutine when the plugin is loaded to avoid this very issue.

I'd suggest trying again to see if the problem persists. If it does, then disable player map markers in the config and try again. If it happens after this then I can rule map markers out as the problem and look elsewhere.
It's really bcz of that map markers. Disabled player map markers and it stoped freezing with that errors. But it was really great option :(
Is there a way to make it not so heavy maybe? We really loved it, but laggs...
What are the specs on the machine? I've used up to 450 markers during testing before I started experiencing severe server lag, and the server never crashed.

Task Manager, Performance tab, right click CPU -> Copy, Paste here. Same for Memory.

```
CPU

Intel(R) Xeon(R) CPU E5-2697A v4 @ 2.60GHz

Maximum speed: 2.60 GHz
Sockets: 1
Virtual processors: 6
Virtual machine: Yes
L1 cache: N/A

Utilization 13%
Speed 2.61 GHz
Up time 38:23:36:51
Processes 45
Threads 697
Handles 17213

Memory

6.0 GB

Slots used: N/A
Hardware reserved: 0.4 MB

Available 936 MB
Cached 868 MB
Committed 5.1/12.4 GB
Paged pool 149 MB
Non-paged pool 77.1 MB
In use 5.1 GB```

Merged post

https://pastebin.com/xYxe2KiU

you can try this
I was wrong, disabling map markers didnt solve the problem. Still calling "onentityspawned" and "onentitykill" and freezing for few secs. I'm trying that version which u gave here.

About server machine, i'm using host for my server, there is core i7 7700k 4.2 GHz, SSD discs and unlimited RAM. Unfortunately i cant tell u more information about machine, but if u need it i can order detailed info.
That's ok, that's enough info.

Which version of AdminRadar is stable for you?

Merged post

I've optimized the code a bit more, just refresh the page at https://pastebin.com/xYxe2KiU
Last one is nice, but... can u make map markers not dissapearing when only moderators ingame? Admin cant be always online, and map markers doesn't show to moders when adm is off.

It would be great if you make it.
In this version when just admin online markers disabling itself somehow. It must be moder online? can it show markers when someone from admin or moders online? i guess now it show just with authlevel 1
I'm not having that issue in this version. It was a typo in the last version that caused it. You'll need to refresh the above page and download that one.

Merged post

Plugin is now updated to 4.5.4
Locked automatically