[SOLVED] MOC very slow on WIndows in Qt 5.3.1

I am moving from Qt 4.8 to 5.3.1 and have encountered a speed issue with MOC. My project used to take about 1 hour to do a full rebuild and now takes about 6 hours. There are a few differences (VS2008 versus VS2013) and of course the Qt version. The vast majority of the time is used in the MOC'ing of files.

The shared disk (drive letter mount of the host Mac Disk) was used on another machine under Qt 4.8 with no effect on MOC speed. It also has no effect on the compile speed or SQL database speed as compared to having local C: drive files. Just included this info in case someone had seen the same problem on a virtual machine using the Qt 5 version of MOC.

2, I migrated all of our code from Qt 4.8 to Qt 5.3.1 this summer and also migrated from VS2008 to VS 2013. I created a new VM with the same OS (Win 7 Ultimate) for the VS 2013. I still have VM with the Qt 4.8 version.

Last VMWare upgrade that I did was earlier this year before I started the 4.8 to 5.3.1 code migration.

Thank you for any insight. We are building on 2 different VM's now (CentOS 7 and Win 7) and will soon also be building on MacOS. This is why I would really like to maintain one copy of the code on the host machine shared between multiple operating systems.

From your descriptions, it sounds like the slowness is related to the way moc and/or Qt accesses files on disk, as well as how VMWare implements shared disks. In your scenario, VMWare did not change, which means that something changed in moc and/or Qt.

You can bring this to the attention of Qt engineers at the "Interest mailing list":http://lists.qt-project.org/mailman/listinfo/interest if you'd like (subscribe first, then you can post). Perhaps they can give you the details of what changed between Qt 4.8 and Qt 5, or even improve the performance.

[quote author="dherold" date="1411959522"]We are building on 2 different VM's now (CentOS 7 and Win 7) and will soon also be building on MacOS. This is why I would really like to maintain one copy of the code on the host machine shared between multiple operating systems.[/quote]The proper way to manage this is to use a version control system, like "git":http://git-scm.com/.

You can host your code somewhere, and pull the latest version to the local disk when you want to build. You can choose between command-line tools or GUI tools like "SourceTree":http://www.sourcetreeapp.com/.