Raised This Month: $ Target: $400
 0% 

List of high cpu usage functions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
waza123a
Member
Join Date: Mar 2010
Old 11-18-2013 , 09:19   List of high cpu usage functions
Reply With Quote #1

Would be nice to know, which functions uses a lot of cpu. (they run a lot times in one sec)
waza123a is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-18-2013 , 09:48   Re: List of high cpu usage functions
Reply With Quote #2

Would be nice to know correctly method to do any code.

For functions, search in forum the version of amxmodx can dump logs with the most functions and their usage and calls.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 11-18-2013 , 10:01   Re: List of high cpu usage functions
Reply With Quote #3

AddToFullPack
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-18-2013 , 11:50   Re: List of high cpu usage functions
Reply With Quote #4

Hokking FM_Think, FM_Touch, FM_StartFrame, FM_AddToFullPack.
Or with engine : pfn_think, pfn_touch (or old one but still alive vexd_pfntouch), server_frame.

Instead of FM_Think and pfn_think, use register_think or hook Ham_Think, depending on your needs.
Instead of FM_Touch, pfn_touch and vexd_pfntouch, use register_touch or hook Ham_Touch, depending on your needs.
Try to optimize FM_AddToFullPack callback and to not hook function in lot of plugins.
Try to avoid hooking FM_StartFrame and server_frame.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 11-18-2013 , 11:51   Re: List of high cpu usage functions
Reply With Quote #5

It really depends on what you want to do in the functions themselves.
Backstabnoob is offline
waza123a
Member
Join Date: Mar 2010
Old 11-18-2013 , 20:18   Re: List of high cpu usage functions
Reply With Quote #6

Thanks, the list will be helpful for many users who wants to optimize plugins.
waza123a is offline
mickymouse
New Member
Join Date: Nov 2013
Old 11-19-2013 , 05:36   Re: List of high cpu usage functions
Reply With Quote #7

Your work is carry the information to the other people. People see your blog and get benefit.
__________________

Last edited by mickymouse; 01-10-2015 at 01:42.
mickymouse is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode