"loading sf3 takes too long time"
Opened this issue · 1 comments
(It is going to be a potential FAQ. This issue is kept open for better visibility)
If we package soundfonts which are in SF3 format bundled as assets in the apk, loading it takes too long time. On my experience, loading FluidR3_GM.sf2 takes like 5 seconds, but FluidR3Mono_GM.sf3 takes like > 180 seconds(!).
It is due to asset compression in the apk. The extraction step is super slow. You should disable compression for those .sf3 files. They are already compressed anyways. In build.gradle
:
android {
aaptOptions {
noCompress 'sf3'
}
}
Actually recent Android Gradle Plugin seems to have some regression with related to aaptOptions
, and noCompress
does not actually work. It is causing a blocking issue in Robolectric too. https://issuetracker.google.com/issues/186418206