Raised This Month: $51 Target: $400
 12% 

Multiple plugins or one big one?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xm3kilo
Member
Join Date: Jan 2018
Old 02-15-2018 , 11:37   Multiple plugins or one big one?
Reply With Quote #1

What's the weight of doing this? I've got about 20 plugins that I want to condense into one big plugin. They all use the same sort of event hooks, would it be better to include everything into one big event for each hook? Or will this cause overhead?

Just want to make everything more optimised

EDIT: The plugins are basically modules of the same overall thing

Cheers!

Last edited by DarkDeviL; 02-21-2018 at 01:33. Reason: Don't blank out posts, - with fixed title too.
xm3kilo is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 02-15-2018 , 12:31   Re: Multiple plugins or one big one?
Reply With Quote #2

You're spending time by combining plugins into one, you won't notice any difference and is MUCH more prone to errors and less maintainable.
__________________

Last edited by klippy; 02-15-2018 at 12:31.
klippy is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 02-15-2018 , 12:37   Re: Multiple plugins or one big one?
Reply With Quote #3

You won’t notice any performance difference. There’s a few reasons why people build large plugins in a module-based format, but the most significant reason in my opinion is that if one part of a sub module failed or was unloaded: it won’t take down your entire mod.

The other reason is that it makes certain features easy to disable. If you don’t want time rankings, remove timer-rankings.smx.

Regardless of these reasons, it’s not going to be worth your time to combine them.

Last edited by headline; 02-15-2018 at 12:37.
headline is offline
xm3kilo
Member
Join Date: Jan 2018
Old 02-15-2018 , 12:45   Re: Multiple plugins or one big one?
Reply With Quote #4

Ah okay, thanks everyone. Is started doing it before I read these comments and I realised I was losing track of what I was looking for etc and went fk me, this is probably not worth it.

So, thanks!

Last edited by headline; 02-20-2018 at 20:15. Reason: Don't blank out your posts
xm3kilo is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-16-2018 , 19:06   Re: Multiple plugins or one big one?
Reply With Quote #5

Quote:
Originally Posted by Headline View Post
You won’t notice any performance difference. There’s a few reasons why people build large plugins in a module-based format, but the most significant reason in my opinion is that if one part of a sub module failed or was unloaded: it won’t take down your entire mod.

The other reason is that it makes certain features easy to disable. If you don’t want time rankings, remove timer-rankings.smx.

Regardless of these reasons, it’s not going to be worth your time to combine them.
Some of the other common reasons to break a large plugin into a modular system:
  • Some parts of the plugin can be encapsulated to make them optional components.
    • You can see this in SourceMod's map voting plugins. mapchooser is the main plugin, rockthevote and nominations are optional components that exist in separate plugins.
  • The main plugin has parts you can switch out, such as
    • Game-specific modules / overrides
    • Storage engines

Overrides came to mind because back when I was still heavily involved in writing SourceMod plugins, I had two plugins that I was working on (one new, one a rewrite/restructure) that were going to use them.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 02-16-2018 at 19:06.
Powerlord is offline
pcmaster
AlliedModders Donor
Join Date: Sep 2009
Old 02-17-2018 , 07:03   Re: Multiple plugins or one big one?
Reply With Quote #6

Personally, I also prefer having smaller sub-modules instead of one enormous plugin, makes maintenance/finding things again easier.
__________________
Stopped hosting servers as of November 2018, no longer active around here.
pcmaster is offline
_GamerX
AlliedModders Donor
Join Date: Jun 2011
Location: Fun Server
Old 02-19-2018 , 19:15   Re: Multiple plugins or one big one?
Reply With Quote #7

One big or plugin with sub-plugins but never put on server e.g. 50+ plugins this making server so bad...
__________________
_GamerX is offline
Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
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 15:50.


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