0.41.1 (77): cleanup and optimisation round (Android and iOS)
Nothing user-visible changes, except that the Android app is half the size and both are lighter on the battery. R8 is on for release builds (21.5 MB -> 10.1 MB); only the two JNI classes are pinned by name, since the app reflects over nothing of its own, and `make dist` keeps the mapping beside the APK. The Kotlin DSP that core/ replaced in 0.37.0 was still compiled into every APK with nothing calling it — it moves to the test source set, where it belongs as the reference the C++ is checked against — and the golden tests' TestVoice wrappers leave core/src for core/tests/voices, so neither app compiles them either. Speed: channel gain, mute/solo and the FX chain are read once per audio block instead of once per frame in Engine::fillBlock (both platforms, bit-identical — all 61 reference scenarios still match); the transport pollers idle at 100 ms (Android) and 10 Hz (iOS) instead of polling flat out while a song is stopped, woken by any transport call; ProjectIo.save builds into one pre-sized buffer and a burst of edits is coalesced into one engine sync; the Kotlin grain sources and factory wavetables are built when their editor opens rather than at launch, where they duplicated ~6 MB the engine already renders in core/; and Xcode builds the DSP core at -O2, the level the golden tests measure, not -Os. Fix: `make lint` failed on a manifest asking for ACCESS_FINE_LOCATION without ACCESS_COARSE_LOCATION (the BLE MIDI scan on Android 8-11), so `make check` passes again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
cdabf3018b
commit
dd04a61e22
+10
-5
@@ -52,9 +52,13 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// Shrinking is off by default so newcomers get readable stack traces.
|
||||
// Flip to true once the app stabilises.
|
||||
isMinifyEnabled = false
|
||||
// R8: shrink + optimise + obfuscate, and drop unreferenced resources.
|
||||
// Only the JNI entry points need keeping (see proguard-rules.pro); the
|
||||
// app reflects over nothing of its own. A release stack trace is now
|
||||
// obfuscated, so keep app/build/outputs/mapping/release/mapping.txt
|
||||
// beside any APK you publish — `make dist` copies it into dist/.
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro",
|
||||
@@ -66,8 +70,9 @@ android {
|
||||
// the app un-optimised and makes Compose several times slower — so measuring
|
||||
// UI "snappiness" on a debug build is misleading. This variant flips
|
||||
// debuggability off (the single biggest perf lever) while reusing the debug
|
||||
// signing key, so it still installs without a release keystore. R8/shrinking
|
||||
// stays off to avoid needing JNI/Compose keep-rules for now.
|
||||
// signing key, so it still installs without a release keystore. R8 stays off
|
||||
// here on purpose: staging exists to measure the UI, and un-obfuscated stack
|
||||
// traces are worth more than the last few hundred KB. `release` is minified.
|
||||
create("staging") {
|
||||
initWith(getByName("debug"))
|
||||
isDebuggable = false
|
||||
|
||||
Reference in New Issue
Block a user