A while ago I tried to dig into the problem of Ogre headers, but never quite finished the work...
Here's what I found :
- There's this little tool analysing which header includes what in a C++ project : https://bitbucket.org/bitsquid/header_hero/downloads
(but it doesn't perform any analysis about compile time for each header, which could be handy)
- There's massive inclusion between Ogre headers.
One cause for that used to be shared ptrs, as they needed to know the full type of the class they were pointing at.
I submitted a patch for this, but didn't have the time/courage to run an analysis to see what heaer dependencies could be subsequently removed.
- Another cause for massive inclusion is sometimes use of inner typedefs/constants/enums : instead of forward declaring the class in the header, you need to include its header.
- All of that process of improving compile times is a hard task, but would be very useful to the community (compiling Ogre itself is no longer a problem with unity builds, but every project using Ogre get bad compile times because of headers)