Quote:
Originally Posted by naris
Actually it DOES increase compile time as it take longer to open, read and compile 274+ stocks in 18 files than it would to compile say, 10 of them in 1 single file, especially if you are compiling a large system. The #define checking just ensure that it does compile and prevents it from parsing and compiling, but not reading, the file multiple times and causing duplicate definition errors.
|
Did you actually test it or do you just think so ?
I just tried it out for you:
Compile time with includes: 1.00 seconds
Compile time without: 1.00 seconds
It doesn't really read all files in every include, it just reads
smlib.inc and cancels at the second line:
PHP Code:
#if defined _smlib_included
#endinput
#endif
Quote:
Why are you concerned about syntax-highlighting function that are not referenced in the file?
|
Also wrong, Functions of
<sourcemod> and
<sdktools> (fake included in
smlib.inc) are used in almost every include file.
Again, they aren't really included for the compiler as it will cancel before in
smlib.inc.
Quote:
Including all of the includes in all of the files is an extremely bad practice. I would never allow anything that does that into our production systems at VW and neither would any of my co-workers.
|
Oh, does VW also use SourcePawn & Pawnstudio ? lol
Believe me, I wouldn't do it if there would be a more beautiful way,
but SourcePawn just isn't C++, so we have to take what we get.
And Syntax Highlighting and Autocompletion makes the Development of smlib just way easier.
__________________