Lets stick with one file and one header. I generate a header which has lots of information in it and i make a light version of that header with many methods removed. The header went from 6k lines to 3k.
Here is an example of how a class looks like in the light header
class SomeClass : public MACRO_FOR_KEYWORD TheBase {
virtual void i_dont_filter_this_out(){}
public:
deque<Var*> ls;
inline SomeClass(){}
inline virtual ~SomeClass(){}
inline SomeClass(deque<Var*> ls_)
{
ls = ls_;
}
};
I tried compiling the same file and it went from 8seconds to 7seconds... Not the results i was hoping for.
I'm thinking maybe the majority of the compile time is because i am defining so many classes and the methods don't matter. But i need all thoses classes to exist. Theres about 280 classes. I don't think thats many.
What can i do to lower my compile time? Should i bother? Its about 9seconds per file and linking is another few seconds. I don't suppose i can do anything but get a faster CPU?
Note: I am using visual studios.