by luigi23 · 4y ago · 0 comments
...wait, what? I know YMMW, but for me and most of my colleagues it's 1-2 clean build per day and 30 incremental... per hour, sometimes.
"...In parallel with our modularization effort, we’re also adopting new technologies like SwiftUI and Xcode Previews. These technologies allow us to almost entirely remove the tweak-compile-and-run loop when developing user interfaces."
This sounds more like SwiftUI ad/SEO blogpost than real developer's insights. SwiftUI Previews is notorious for crashing, timeouts and random errors. I have a lot of problems with these on small projects, not to mention bigger ones at work. It's also a nonsense to proclaim 'it remove tweak-and-compile' loop. Any change to model layer requires you to rebuild project, otherwise Previews will return old state. Not to mention that Xcode likes to rebuild project even for UI-only change.
In an ideal world GUI tools would let you easily specify what parameters were required from the user, what standard very flexible and adaptable widgets were to be used to get those parameters, and how the parameters are constrained. All with a coherent special purpose language or some other fit for purpose technique, with an absolute minimum of pixel tweaking etc involved.
Sadly it's not an ideal world.
30 incremental builds an hour sounds pretty high to me, unless you’ve got a smaller app. On Intel machines, I’ve been seeing minimal incremental build times of over a minute. The M1 obviously make some pretty significant improvements in this situation.
However, while I’m relatively new to the iOS world, it seems linker performance is a fairly hot topic. I know more than a few people are eyeing support for Mach-O linking in mold, based on the massive speedups shown for Linux.
Just going to plus one this point in particular. I just started working on an app for the first time in January, chose SwiftUI, and probably wasted at least a few days' worth of work time dealing with non-problems that become problems only because of using SwiftUI Previews.
Once I disabled Canvas and removed the Preview struct, my dev time got quite a bit more efficient.
Yeah, this doesn't make any sense for me either... I only do clean builds of any of my software when I am working on the build system itself or am cutting releases (so I'd measure them on a small handful per week), and I'm constantly doing incremental builds so quickly it is essentially a pipeline: I don't even wait for the build to finish before I'm making more changes. Why are they doing so many clean rebuilds?