View Single Post
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 06-23-2022 , 10:05   Re: plugin causing csgo srcds freeze
Reply With Quote #12

What he means is that stuff that runs a lot of times per second (based on frame/tick) should have the variables already created, cause this process is kinda expensive when running loops/lot of times.

Is better to use variables that you already have the value like "which button" is being pressed, before, when possible, than all that calculations logic.

Also, you shouldn't do a lot of calculations inside this process cause will hang

A good use case would be putting all that inside a timer, so instead of calling 1280 times per second you could optimize it to running, for example, once per second.
__________________

Last edited by Marttt; 06-23-2022 at 12:16.
Marttt is offline