@mortengregersen Hey! Have you ever seen Bagbutik-Models take a long time to build in a release configuration?

We're seeing ~0:14 for debug and ~1:45 for release builds for that target alone.

The compiler seems to spend most of the time just using one core then uses them all towards the end. Debug uses all the cores from the start.

@craigsiemens Hi! I must admit, that I haven’t looked that much into build times for Bagbutik, but I know there are at least one thing to optimize (in Bagbutik-Models), which should slim down the size of the built library (and maybe also speed up building?)

@mortengregersen Cool, our workaround is to use a debug build since it's just a CLI tool, but it'd be nice to go back to release ones.

The only idea I had would be splitting the models into either multiple modules or moving them into the module that uses them. That's just assuming the number of files in the module was the issue.

What kind of effort would the optimization be? If there's an issue for it I’d love to follow it and possibly help out.

@craigsiemens I have to look into optimizing the library (both build time and binary size). It also impacts my workflow with @AppDabApp and the new app I am working on.

When I split up the library into the current modules, my thought was to split the models into the corresponding modules, but this is not easily done, as the models depend on each other.

I don't have an issue for it. I've heard that the auto synthesis of Codable has a big impact, so maybe a general CodingKey implementation.