Jump to content

OnPlayerConnected hook causing FPS spikes

Pending 2.2.2

I've had ocassional lags happening on my server, i have checked the console and whenever FPS spike occured, there was always this line "OnPlayerConnected" is this normal?

 

10/01/2022 14:55:26 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 378ms
10/01/2022 14:53:57 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 348ms
10/01/2022 14:51:40 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 358ms
10/01/2022 14:50:51 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 380ms
10/01/2022 14:46:51 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 372ms
10/01/2022 14:46:45 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 381ms
10/01/2022 14:44:26 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 437ms
10/01/2022 14:41:05 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 331ms
10/01/2022 14:39:54 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 377ms
10/01/2022 14:36:24 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 422ms
10/01/2022 14:36:04 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 353ms
10/01/2022 14:33:19 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 400ms
10/01/2022 14:32:39 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 405ms
10/01/2022 14:31:25 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 352ms
10/01/2022 14:30:11 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 334ms
10/01/2022 14:29:56 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 347ms
10/01/2022 14:29:26 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 347ms
10/01/2022 14:28:31 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 346ms
10/01/2022 14:28:08 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 354ms
10/01/2022 14:27:35 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 365ms
10/01/2022 14:27:21 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 344ms
10/01/2022 14:25:31 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 368ms
10/01/2022 14:22:47 | Calling 'OnPlayerConnected' on 'PlayerRanks v2.2.3' took 343ms 


 

Share this comment


Link to comment

Hi,
I'll look into this.
Does that look right...Are players joining and leaving your server that frequently?
Also, is your PlayerRanks.json file in the data folder huge?
 

Thanks. 👍

Share this comment


Link to comment

well im running only 130pop server... it has 500kb, but i was mainly wondering about those times it takes each time.... 

Edited by TomNXT

Share this comment


Link to comment

hey, so after a month i just cant help myself but to blame this plugin again, this onplayerconnected hook keeps raising my cpu usage and dropping server fps... what does it do and is there a way to disable this feature please? i like plugin alot but this is killing me

Share this comment


Link to comment

Sorry. Honestly, I forgot about you.

Would you mind trying the attached file? (removed...see next reply)
Thank you.

 

Edited by Steenamaroo

Share this comment


Link to comment

so you have managed to fix it? in the DM's you explained quite much that its a necessary feature :D, i mean i cant see anymore that onplayerconnected hook and fps seems fine so far, if this will work then sure thank you lol

Share this comment


Link to comment

I don't know, to be honest. I can't replicate the issue and no one else has reported it but if the changes I made fix the issue on your server I'm happy to consider it solved. 🙂

Share this comment


Link to comment
1.1m

Downloads

Total number of downloads.

5.7k

Customers

Total customers served.

82.3k

Files Sold

Total number of files sold.

1.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.