Posts: 249
Threads: 29
Joined: Apr 2011
Reputation:
0
Does anyone know how much ms is that callback?
Posts: 472
Threads: 26
Joined: Jan 2012
Reputation:
0
what how much is that callback?
you mean how many times is it called? then its called every second while you do a action.or it could be when you chage your state i mean driveing spectating etc... dont know perfectly sorry.
Posts: 222
Threads: 35
Joined: Apr 2008
Reputation:
0
As far as I know, it gets called at about every second if you're standing still and doing nothing and if you move ( Drive, run, whatever. ) it gets called many more times, not exactly sure how much times though.
Best regards,
Jesse
Posts: 249
Threads: 29
Joined: Apr 2011
Reputation:
0
Thank you both. Well, for cheap host, seems I have to use timers instead of this.
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
how about you show what you are putting in it so others can help you optimize it?
Posts: 249
Threads: 29
Joined: Apr 2011
Reputation:
0
Actually it is for general things such as glass objects re-create, players' exp bar update, scores, anti cheats etc. but I made a 2000 ms timer for all of them. I think it will reduce CPU usage.
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
now sure what you mean by the window thing, exp should be done when the experience changes, anticheat is perfect for OPU, also running everything on a 2000ms timer might be worse if they're all doing the checks in the same function.
there's a profiler plugin that allows you to see what's causing bottlenecks in your script