I am looking to optimize some aspects of a plugin I am working on which is now up to 14.5k lines of code, uses tons of variables and many tasks which run throughout a given round in CS. Some reports coming in from some beta server admins are that their servers are using more system resources and causing a higher load average overall, this I expected. I am considering ways to optimize the code and the first thing that comes to mind involves the tasks I have running.
How are tasks handled within amxx, are they spawned off as seperate threads or are they executed within a single thread? Do tasks use a standard pool of memory or do they have their own copies for variables and such? Many tasks I have running are for a single player and I am wondering if it is worth the time coming up with new approaches that have 1 task running to handle all of the players for specific things.
Any insight the amxx devs or other knowledgable people can shed on how tasks are handled will be appreciated!
-Mug