MSVC builds unusable slow

I’ve setup CI builds for a rather large project. There are actions to build it with GCC (in two variants) and with MSVC. The GCC builds usually finish in about 3 hours, but the MSVC build is killed after the timeout at 6 hours. Did I configure something wrong? The workflow file is here: (Note: Linux builds commented out but they build in about 2.5 hours) The last log with successful GCC and failed MSVC build is here: