Raised This Month: $ Target: $400
 0% 

does is possible this code to be shorter ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iLlegalzp
Member
Join Date: Dec 2015
Location: Burgas
Old 12-06-2015 , 10:44   does is possible this code to be shorter ?
Reply With Quote #1

Hello, I have a lot of plugins in my Zombie server and sometimes (not very often maybe wen the server is 32/32] have lag and for this i want part of the plugins to be shorten. For example this code - http://pastebin.com/HQatZ0yh
iLlegalzp is offline
Send a message via Skype™ to iLlegalzp
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-06-2015 , 10:56   Re: does is possible this code to be shorter ?
Reply With Quote #2

Code length pretty much has nothing to do with performance. A 5 line long code can perform as bad as a 100 line one. Really depends on what that code is doing.
And, by looking at your code, it seems like it is something called on map change. Something executed at map change most likely has no effect on lag during the map.

Last edited by klippy; 12-06-2015 at 10:57.
klippy is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-06-2015 , 11:13   Re: does is possible this code to be shorter ?
Reply With Quote #3

I would need to see more code to figure out how to reduce it. There is a lot of redundancy so I'm thinking it can be. But as Klippy said, if its called somewhere like plugin_init or plugin_cfg, this is done at map change only and will not affect gameplay. Reducing code for the sake of reducing it might not be a reasonable reason to re-write half of this plugin.
__________________

Last edited by Bugsy; 12-06-2015 at 11:25.
Bugsy is offline
Reply



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 18:06.


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