View Single Post
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 01-29-2011 , 00:41   Re: SMLIB 0.9.2 BETA (269 Function Stocks) | updated 28.01.2011
Reply With Quote #29

Quote:
Originally Posted by naris View Post
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.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0

Last edited by berni; 01-29-2011 at 01:01.
berni is offline