Shared precompiled headers

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France

Shared precompiled headers

Post by Mikachu » Sat Oct 15, 2011 5:12 pm

Hi,

I was recently thinking about a way to further reduce compilation times of Ogre : would it be possible to share a single precompiled header between all the samples? (I mean, a precompiled header that would just include "Ogre.h")
They all include some parts of Ogre, which makes their compilation not so quick (we're talking about 30 seconds for a 100 lines of code project, there).

Has anyone got any experience about it, and know if it's feasible/has any pitfall?
When I'll get the time, I think I'll try that on my own project and see if that can apply to Ogre too.. :)
0 x
OgreProcedural - Procedural Geometry for Ogre3D

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: Shared precompiled headers

Post by CABAListic » Sat Oct 15, 2011 5:46 pm

Probably not easily, but I have thought about methods to use CMake to dynamically gather all of the samples into a single project, which would hugely benefit from our Unity build method. I will try this after 1.8 is released.
0 x

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: Shared precompiled headers

Post by spacegaier » Sat Oct 15, 2011 7:07 pm

I created a new feature ticket for that, with target version 1.8.1 and assigned it to CABAlistic :) .

http://www.ogre3d.org/mantis/view.php?id=470
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: Shared precompiled headers

Post by CABAListic » Thu Oct 20, 2011 11:26 pm

I have reconsidered and am now trying to get this into 1.8. With the Unity build option, the Samples are essentially the most time-consuming process now, so getting this reduced would fit well for the 1.8 release. I have already gotten the basic idea working on my local repository. There are a few quirks I need to iron out before I push it, but I'm hoping that will get done over the weekend.

Compile time on my machine for the whole Ogre project is down to approx. 1:30 mins, OgreMain occupies half of that time.
0 x

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: Shared precompiled headers

Post by spacegaier » Fri Oct 21, 2011 6:12 am

Wow, that sounds awesome!
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

Post Reply