Raised This Month: $ Target: $400
 0% 

Removing comments from AMXX's config files -> performance improvement?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iVoka
Junior Member
Join Date: Jun 2008
Location: Bulgaria
Old 08-07-2011 , 11:22   Removing comments from AMXX's config files -> performance improvement?
Reply With Quote #1

Hello!

I have been wondering for some time if removing the helpful comments from AMX Mod X's config files (like amxx.cfg, plugins.ini and so on) would lead to any performance improvements, because it seems that more than a few people I know are using this technique, saying that it's an optimization that should speed things up.

I have not seen any information on the net regarding this matter and I tend to believe that they are wrong, but would like to hear the opinion of some more experienced people.
__________________
~ Best Regards,
~ iVoka
iVoka is offline
NAQQASH
Senior Member
Join Date: Dec 2010
Old 08-07-2011 , 11:42   Re: Removing comments from AMXX's config files -> performance improvement?
Reply With Quote #2

If comments are not even going to execute then how they can effect server's performance.
Like in many plugins you'll see disclaimers, GPL information, but when you compile them the plugin will only recognize those words which are necessary for it.

None of the cfg recognizes words which starts with "; // " etc.
__________________
Bye bye AlliedModders.
NAQQASH is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-07-2011 , 11:45   Re: Removing comments from AMXX's config files -> performance improvement?
Reply With Quote #3

Technically, it will be faster because you call less native. But, reading a file is fast already and just few lines in less won't change anything, at least won't be noticeable.
__________________
Arkshine is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 08-07-2011 , 15:19   Re: Removing comments from AMXX's config files -> performance improvement?
Reply With Quote #4

When improving performance, go for stuff that really needs to be optimized, not trivial stuff like comments in configs.

Places to look for improvements is stuff like expensive and complex tasks. However, what's most important is stuff that's repeated a lot. Even though the task is simple itself, it could be a slowdown if repeated many times.

Config files are usually just parsed once every time a map is loaded. You'll probably just save a few microseconds (or even nanoseconds) by removing some comments. The result is a server which looks exactly as fast as before, and a config file that might be more difficult to read (because of missing documentation comments).
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)
rhelgeby is offline
Send a message via MSN to rhelgeby
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-07-2011 , 20:44   Re: Removing comments from AMXX's config files -> performance improvement?
Reply With Quote #5

You won't see ANY difference on any file that is read before players enter the server (files read ing plugin_init, plugin_precache, plugin_cfg). The only files that it would help on are files that are read mid-game which are very rare. The only file that I can think of that is read mid-game is users.ini but that is still essentially negligible because it is only read when you use amx_reloadadmins.
__________________
fysiks is offline
ARES[ro]
Senior Member
Join Date: Apr 2010
Old 08-08-2011 , 02:31   Re: Removing comments from AMXX's config files -> performance improvement?
Reply With Quote #6

Well if you had 3+ literature books of text in a huge comment in one of the files then yeah...
__________________
okay
ARES[ro] is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-08-2011 , 10:28   Re: Removing comments from AMXX's config files -> performance improvement?
Reply With Quote #7

Quote:
Originally Posted by ARES[ro] View Post
Well if you had 3+ literature books of text in a huge comment in one of the files then yeah...
Thank you for posting without contributing anything.

Removing comments only slightly (and very slightly such that you won't notice) improves performance for large files when they are manually being read by a plugin.
Config files that are executed won't have a performance increase from removing these comments.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 08-08-2011 at 12:00.
Exolent[jNr] is offline
iVoka
Junior Member
Join Date: Jun 2008
Location: Bulgaria
Old 08-08-2011 , 11:52   Re: Removing comments from AMXX's config files -> performance improvement?
Reply With Quote #8

Thank you all for the clarification.
__________________
~ Best Regards,
~ iVoka
iVoka is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-08-2011 , 12:39   Re: Removing comments from AMXX's config files -> performance improvement?
Reply With Quote #9

Since most of the files are read only once (during the start up of the server/map), it's useless to remove comments (which in many cases are useful to be kept).
__________________
hleV is offline
ARES[ro]
Senior Member
Join Date: Apr 2010
Old 08-08-2011 , 15:41   Re: Removing comments from AMXX's config files -> performance improvement?
Reply With Quote #10

Quote:
Originally Posted by Exolent[jNr] View Post
Thank you for posting without contributing anything.
No problem.

Also aside from getting bashed by our top moderators like I ever did anything to them or any of their friends, you shouldnt even bother cleaning your .cfg files of comments, but if you have the "wait" command in them then remove them I dont find any use for those server-side and its not threaded it just wastes a frame.
__________________
okay

Last edited by ARES[ro]; 08-08-2011 at 15:44.
ARES[ro] 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 20:06.


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