Sync very slow for `Debug` build in Swift

Just a heads-up if other devs are experiencing sync performance issues while debugging in Xcode:

I’m working on a macOS app that’s using Atlas Device Sync. Atlas currently contains about 600,000 objects. Syncing/uploading them into Atlas is fairly quick with an M10 instance (1-2 minutes), but the first sync/download to a new client is very slow (several hours) when using a Debug build of the app. When building with a Release configuration, the performance is fine (~3 minutes).

The process seems to be bottlenecked by the CPU; a single core is maxed out for the whole time.
Most time is spent in realm::_impl::TransformerImpl::Transformer::transform_major(), which contains a lot of conditional statements when REALM_DEBUG is enabled.

The Swift package enables REALM_DEBUG by default for Debug builds.