Using a precompiled header?

Moderator: Project members

Post Reply
500 Command not understood
Posts: 4
Joined: 2008-06-14 18:25
First name: J.
Last name: K.

Using a precompiled header?

#1 Post by carole » 2008-06-30 03:33

It's pretty common for Windows programmers to use precompiled header such as through 'stdafx.h' to minimize compile time.

But, current FileZilla project doesn't use precompiled header. In order to estimate the benefit of using precompiled header, I've tested on Windows:

1) Installed wxWidget
2) Just open FileZilla.sln on Visual Studo 7.1
3) Manually added wxWidget directories

Yes, it's not perfectly compiled. However, without precompiled header (which is default), the time were 50 secs and 55 secs for engine and FileZilla projects, respectively.

Then, I've turn on to use precompiled header:
1) FileZilla.h would be a precompiled header
2) Change precompiled options accordingly: except FileZilla.cpp, all files are set to use precompiled header. For FileZilla.cpp, set to create precompiled header.

The results were 16 secs and 27 secs; this is a great improvement. (although not successfully compiled whole projects)

This simple test gives a good reason to use a precompiled header. I'd like to hear your opinion about that.


Post Reply