Cooking for iOS on a Mac via command line takes hours

The problem happens only when cooking new/modified textures. During other steps of the cooking/packaging process CPU usage is normal, but is abnormally low while compressing textures. It doesn’t seem to be PVRTexTool: it only shows up in the activity monitor for a brief moment and then UE4Editor will idle for several seconds before firing it up again.

Bringing the UE4Editor process to foreground by clicking on its icon on the dock greatly speeds up the process and increases CPU usage. Switching away the focus to any other app drops the CPU usage and slows down the build time.

Here are the timestamps for compressing two lightmaps. It takes around 7 minutes to compress two textures In background and only four seconds in foreground. The suggestion for using nice/renice to increase process priority cannot be used in my case, since I’m using RunUAT.sh to build, unless I modify the UAT.

I’m still on 4.5.1, but I was looking through the master branch source code trying to see if there is any changes about this and couldn’t find anything (or I’m not looking at the right places).

I can confirm this problem no longer exists in 4.9.1. Our Macbook is being put to work hard when cooking PVR textures now!