Issue metadata
Sign in to add a comment
|
WebAudio HRTF WAV resource occupies 240Kb APK size |
||||||||||||||||||||||||
Issue descriptionIDR_AUDIO_SPATIALIZATION_COMPOSITE is an uncompressed WAV file used for WebAudio, which is the single largest resource file on Android. In http://crbug.com/609219#c9 it was chosen not to be gzip-compressed although it's not obvious to me that it really meets the qualifications for staying uncompressed. In the short-term, we can simply add compress="gzip" to shave off 100k, as I did in https://codereview.chromium.org/2412373002 . In the medium/long-term, we can likely get even greater savings FLAC compression, support for which should be coming soon according to http://crbug.com/93887 .
,
Oct 13 2016
FLAC actually doesn't compress this file any better than gzip: $ flac -f -8 third_party/WebKit/Source/platform/audio/resources/Composite.wav Composite.wav: wrote 147717 bytes, ratio=0.601
,
Oct 13 2016
The composite file contains the impulse responses for the HRTF panner. hongchan@ had a CL to cut that in half because the left and right channels are exactly identical. However, the CL wasn't finished because it wasn't producing the same results as before, and we didn't consider it critical. Perhaps we should re-evaluate this soon. Compressing it is ok, but decompression isn't free and it will delay the initialization of the HRTF panner mode, which is noticeably slow on desktop and even slower on Android devices that tend to be less powerful.
,
Oct 13 2016
Sounds great, I'd certainly like to see it cut in half by removing the unnecessary data, in addition to the compression. It sounds like both those approaches combined would lead to 70% savings (making it ~70Kb). That seems worth doing -- it's hard to find APK size savings of this magnitude. > Compressing it is ok, but decompression isn't free and it will delay the initialization of the HRTF panner mode, which is noticeably slow on desktop and even slower on Android devices that tend to be less powerful. Well, one way of looking at that is that if it's already slow, then you have no performance guarantees and the decompression cost may be relatively negligible. Our users probably shouldn't be paying disk space+update bandwidth just for a slow feature to still be slow anyways.
,
Oct 13 2016
,
Oct 13 2016
Well, no. That's like saying Chrome is slow to start up, so it's ok to make it even slower. No one would allow you to do that. We want to make it faster, not slower. The slowness has audible effects (and also used to have visible effects).
,
Oct 13 2016
> That's like saying Chrome is slow to start up, so it's ok to make it even slower. Correct, if for example it takes 200ms to start up and we are considering introducing a 5ms regression to improve another metric like RAM.
,
Oct 13 2016
This kind of tradeoff question comes up a lot with System Health team (I had an extended discussion along these lines when launching GPU raster) and lately the philosophy has been to list and measure key user stories: https://docs.google.com/presentation/d/1Ewk8U4Ct7yXxtfeGMDZVAbltzSaMKUoawqrqoABI8Eg/edit#slide=id.p . The discussion can be especially fraught when impact on a niche user story like WebAudio webapp usage needs to be traded off against a key user story like Chrome install/update. (But my point is that it's not obvious the harm to WebAudio would be nonnegligible in this case, anyway.) Anyway, purely philosophical debates like this don't usually finish with consensus, so we can let the disagreement stand for now and revisit with data in hand when FLAC compression is actually available. In the meantime, please go ahead and remove the half-redundant data; assigning to hongchan@ for that part.
,
Oct 28 2016
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by aelias@chromium.org
, Oct 13 2016