How many includes can I have?
#1

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.
Reply
#2

An include is just pawn code that is copied into your script on compilation.
Reply
#3

Quote:
Originally Posted by RageCraftLV
View Post
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.
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.
Reply
#4

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.
Reply
#5

Thanks for the help!
Reply
#6

Quote:
Originally Posted by Abagail
View Post
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)