![]() |
precompiled prefix header - Printable Version +- Forums (https://www.vdrift.net/Forum) +-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4) +--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9) +--- Thread: precompiled prefix header (/showthread.php?tid=559) |
precompiled prefix header - abs1nth - 03-22-2007 after the release has been made, would you be interested to consider using a global header file for all external includes? i've tried it out today and here are the results: - cuts about 500 lines of redundant code - reduces compilation time from 22 to 18 secs and further down to 12 when precompiling the prefix header (these are for a debug build on my machine) in case you are interested i've uploaded the patches: new include/pch.h file: http://pastebin.ca/407011 svn diff for include directory: http://pastebin.ca/407015 svn diff for src directly: http://pastebin.ca/407020 you'd also need to modify the scons scripts to pass "-include include/pch.h" to gcc ... - thelusiv - 03-22-2007 I'm all for cutting down on redundancy. Are there any possible ill side-effects we may run into? I'm trying to imagine some but not coming up with much. I'm thinking this is probably a pretty good idea. Any thoughts, Joe (or anyone else)? - abs1nth - 03-22-2007 can't think of any. i actually expected the build time to go up when not precompiling the prefix header, but that doesn't happen, on the contrary. also since it modifies also things in vamos it might make syncing with upstream more difficult, but it seems you aren't planning to resync with them anyway (is vamos still under development?) and we have already diverged quite much here. - thelusiv - 03-22-2007 As far as I know Sam (Vamos author) hasn't done anything with it in almost two years. Last I heard from him he was very busy and didn't have much time for it anymore. I'm pretty sure we're the only relatively large project that uses it. And yes, we have made a few changes to the Vamos code by now. Now that you mention it...I have been thinking about setting up a Vamos SVN repository and using the svn external feature to grab it when people check out VDrift. This might encourage other developers to use Vamos more which means more people contributing back to the library. Another idea which might actually be much better would be to work some of the lower-level stuff in VDrift back into Vamos (or some new library containing it and more stuff) which would ultimately be more useful than Vamos by itself. This is a big digressional tangent that has nothing to do with your quetsion...and will need some more discussion before any of that happens. So my point is, don't worry about Vamos too much in this respect, making changes is OK. ![]() - joevenzon - 03-22-2007 reducing compile times sounds good to me.... - abs1nth - 03-27-2007 so should i just commit this to trunk? - thelusiv - 03-27-2007 Sure, go ahead. - abs1nth - 03-27-2007 ok commited hope everything is alright don't forget: >you'd also need to modify the scons scripts to pass "-include include/pch.h" to gcc ... - alex25 - 03-27-2007 abs1nth Wrote:ok commited hope everything is alright nothing compiles anymore. can we please fix it? --alex-- - abs1nth - 03-27-2007 alex25 Wrote:nothing compiles anymore. can we please fix it? i'm sure someone will fix the SConstruct files soon enough - joevenzon - 03-28-2007 *looks around* where's thelusiv? :-) if it doesn't get fixed by tomorrow I'll give it a shot, but we probably don't want that.... - alex25 - 03-28-2007 abs1nth Wrote:i'm sure someone will fix the SConstruct files soon enough huh?! shouldn't whoever broke it fix it? just wondering... --alex-- - abs1nth - 03-28-2007 guess fixing it would need something like inserting local_env.Append(CCFLAGS = '-include ../include/pch.h') at line 72 in src/SConscript but thats just a wild guess ;-) - thelusiv - 03-28-2007 That didn't work, and I've tried quite a few other methods like adding it to the SConstruct but for some reason, no matter what it always says it can't find the file. However if I just add a Code: #include "pch.h" - abs1nth - 03-28-2007 thelusiv Wrote:That didn't work, and I've tried quite a few other methods like adding it to the SConstruct but for some reason, no matter what it always says it can't find the file. what about: local_env.Append(CCFLAGS = '-include #/include/pch.h') thelusiv Wrote:to the files that complain about it, it's fine. abs1nth, is this going to mess up your build system somehow? should be fine ;-) |