[Interest] Tricks to improve moc performance?

Adam Light aclight at gmail.com
Mon Dec 9 20:32:29 CET 2019


On Fri, Dec 6, 2019 at 6:08 PM Thiago Macieira <thiago.macieira at intel.com>
wrote:

> On Friday, 6 December 2019 15:10:41 PST Adam Light wrote:
> > > Yes:
> https://github.com/qt/qtbase/blob/dev/util/includemocs/includemocs.pl
> >
> > Thanks. That saved a lot of time.
> >
> > For what it's worth, after changing all of our code to directly #include
> > the moc output, the total build time dropped by around 10%. That's
> helpful.
>
> Nice. Did you notice a size improvement in your optimised binaries too?
>
>
On Macintosh, with Xcode 10.2, the application's executable went from
202627092 bytes to 202587956 bytes. This is a release build (-O2). So the
decrease in size is small, but measurable.

I haven't tested the executable sizes on Windows yet. Strangely, on
Windows, this change has almost zero effect on build time. The time to run
qmake has increased slightly (about 3:10 to 3:20) but the remaining build
time (everything within jom.exe) only dropped by about 8 seconds (total of
about 7 minutes). On Macintosh, the qmake time also increases slightly but
the rest of the build is about 45 seconds faster (6:15 to 5:29). The
Windows builds are release builds with VS2017.

Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20191209/d70225ba/attachment.html>


More information about the Interest mailing list