Compile of c file with Xcode 13 take too long

Hi,

We have a large workspace with multiple targets with a mix of Objective C and Swift code.

We have been doing our best to update the frameworks used and use module maps where possible.

However with Xcode 13 our build times for one target have ****-out to a very large time. I was able to trace it to one file in a framework:

However in another target it is significantly less:

These two targets are not that different in terms of frameworks linked and files etc.

Have not been able to identify exactly what might be causing the differences here.

Note also if we compile the framework on it's own then the compile time is at the lower value.

This file is large ~ 8MB and contains some large switch statements. it is not including any objective c or swift just c headers with an enum.

Any ideas on what to look for here would be most welcome.

Thants