I wrote a syllable-composing module for an input method. This module consists of only one file.
However, in Xcode timeline it looks like it takes pretty much time to compile.
Therefore, I would like to ask here for possible guidance in how to optimize this module for faster compilation.
// More than 20 seconds for compilation on mac mini 2018 (64GB Ram, 6 core) with Xcode 14.
See screenshot here: Needs some guidance in order to let this file compile faster. : swift (reddit.com)
P.S.: I tried to tear this file into certain parts. However, this only boosts the compilation time if I only compile this module only, as it utilizes multiple threads for individual files. If I use this as a swift package in an Xcode project, Xcode only compiles it using one thread per architecture. That's why I decided to duplicate this question from Reddit to here.