13.05.2012, 22:53
I develop the script with this problem.
I have one huge core timer using two foreach loops to process everything and there is absolutely no data saving, but it has a 1000ms interval. The code processed in this timer is measured to roughly 1100 lines, but I've tried to optimize it as much as I could.
I did some debugging to check how long it did take the timer to be processed (1 player) and the results were:
I used the crashdetect plugin to find the cause too, and I had a hint on my login script. Now, I can't see how this is affecting my script, since it happens randomly. Sometimes it's normal (no CPU usage increase) but sometimes it rises to over %100.
I have one huge core timer using two foreach loops to process everything and there is absolutely no data saving, but it has a 1000ms interval. The code processed in this timer is measured to roughly 1100 lines, but I've tried to optimize it as much as I could.
I did some debugging to check how long it did take the timer to be processed (1 player) and the results were:
Код:
[18:27:21] *tick: 1 [18:27:23] *tick: 0 [18:27:24] *tick: 0 [18:27:25] *tick: 0 [18:27:26] *tick: 0 [18:27:27] *tick: 0 [18:27:28] *tick: 0 [18:27:30] *tick: 0 [18:27:31] *tick: 0 [18:27:32] *tick: 0 [18:27:33] *tick: 0 [18:27:34] *tick: 0 [18:27:35] *tick: 0 [18:27:36] *tick: 0 [18:27:38] *tick: 0 [18:27:39] *tick: 0 [18:27:40] *tick: 0 [18:27:41] *tick: 0 [18:27:42] *tick: 2 [18:27:43] *tick: 0 [18:27:44] *tick: 1 [18:27:46] *tick: 0 [18:27:47] *tick: 0 [18:27:48] *tick: 1 [18:27:49] *tick: 0 [18:27:50] *tick: 0 [18:27:51] *tick: 0