@@ -20,6 +20,7 @@ There are two optimization levels for moc objects :
20
20
- group every QObject classes (headers) into a single header, then call moc on this file. (` MOC_LVL_2 ` , even faster)
21
21
22
22
QMake-unity provides good integration with Qt 5 tooling system (qmake, moc, qt-creator) and with MSBuild.
23
+ It is compatible with precompiled headers (PCH).
23
24
24
25
Here are general articles if you want to understand how it works :
25
26
- [ Jumbo, A unity build system for Chromium] ( https://bit.ly/jumbo-blinkon9 )
@@ -222,14 +223,21 @@ It has been run on a Windows 10 laptop powered by an i5 8250u.
222
223
223
224
### [ QupZilla] ( https://github.com/QupZilla/qupzilla ) built with ` MSVC `
224
225
225
- | Project part | QMake-unity | Time |
226
- | ------------ | ------------ | ---------------- |
227
- | lib | not enabled | 3m14 |
228
- | lib | MOC_LVL_1 | 52s (73% faster) |
229
- | lib | MOC_LVL_2 | 26s (87% faster) |
230
- | plugins | not enabled | 1m15 |
231
- | plugins | MOC_LVL_1 | 27s (64% faster) |
232
- | plugins | MOC_LVL_2 | 22s (71% faster) |
226
+ PCH raw = 59s
227
+ PCH + MOC_LVL_1 = 35s
228
+ PCH + MOC_LVL_2 = 19s
229
+
230
+ | Project part | QMake-unity | PreCompiledHeader (PCH) | Time |
231
+ | ------------ | ------------ | ----------------------- | ---------------- |
232
+ | lib | not enabled | not enabled | 3m14 |
233
+ | lib | MOC_LVL_1 | not enabled | 52s (73% faster) |
234
+ | lib | MOC_LVL_2 | not enabled | 26s (87% faster) |
235
+ | lib | not enabled | enabled | 59s (70% faster) |
236
+ | lib | MOC_LVL_1 | enabled | 35s (82% faster) |
237
+ | lib | MOC_LVL_2 | enabled | 15s (92% faster) |
238
+ | plugins | not enabled | not enabled | 1m15 |
239
+ | plugins | MOC_LVL_1 | not enabled | 27s (64% faster) |
240
+ | plugins | MOC_LVL_2 | not enabled | 22s (71% faster) |
233
241
234
242
### [ QtXlsxWriter] ( https://github.com/dbzhang800/QtXlsxWriter ) built with ` MinGW `
235
243
| QMake-unity | Time |
@@ -252,9 +260,9 @@ It has been run on a Windows 10 laptop powered by an i5 8250u.
252
260
## What else can I do to speedup my build
253
261
254
262
** Pure C++ techniques :**
263
+ - Use precompiled headers (PCH) : useful for big executables/libraries
255
264
- Forward declare headers (incremental build)
256
265
- Write less templates
257
- - Use precompiled headers (PCH)
258
266
259
267
** Qt :**
260
268
- If you build in VisualStudio, install Qt Visual Studio Tools <= 2.2; which now supports parallel calls of moc.
0 commit comments