Posts: 56
Threads: 10
Joined: Jun 2016
Reputation:
0
So, I've been wondering, how many includes I can have in gamemode. While browsing includes section, I've found so many good includes, but will too many includes be bad for performance? Let's say that the includes are well optimized.
Posts: 506
Threads: 15
Joined: Mar 2009
Reputation:
0
An include is just pawn code that is copied into your script on compilation.
Posts: 34
Threads: 9
Joined: Nov 2017
Reputation:
0
Infinite i assume tho i read somewhere along the way that load order might impact the memory aloc (Don't quote me on this) but yeah many people use it to order their script so it doesn't become a mess.
Posts: 3,004
Threads: 12
Joined: May 2011
Quote:
Originally Posted by Abagail
Includes themselves don't have ANY direct performance impact at runtime, as includes are handled during compilation and don't remain as "includes" when compiled (if that makes sense). The actual code being used will ofcourse have an impact, but there is no additional load at all during run-time just for having includes.
|
I actually doubt that it has zero performance impact on compilation at all, include after all needs to open a file and read it and the hooks & defines should be compiled as well.
It should have at least a very little performance impact on the compilation. (on modern setups)
I think pc's with an hdd running on a potato, the performance impact on compilation would be noticeable the most.