Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce library size by using shorter example audio files #66

Closed
kevinstadler opened this issue Mar 18, 2021 · 1 comment
Closed

Reduce library size by using shorter example audio files #66

kevinstadler opened this issue Mar 18, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@kevinstadler
Copy link
Collaborator

kevinstadler commented Mar 18, 2021

vibraphon.aiff in particular (at 1 minute length / 5MB size) is used in more than one example, where a much shorter file (maybe 10s) would probably do.

(for future reference: up to release 2.3.0 total library download size was ~16MB)

@kevinstadler
Copy link
Collaborator Author

With b05bc0d the library size is now down to 8.7MB (6.6MB compressed download), but only 700KB (500KB compressed) of that are actual binaries, the rest being audio files included with the example sketches (sometimes multiple copies of the same file, since every example sketch needs the file in its own data/ folder), which then also get re-downloaded unnecessarily with every update.

The idea was floated to drop the included files in favour of loading them on demand from online URLs which can be passed to Soundfile. Hosting the files in this way would also have the advantage of being able to collect some (anonymous) data about example usage, at least for examples using Soundfile (which happens to be the most looked-up feature in the online reference). It would also be possible to create two separate builds, a 'slim' one with the external URLs as well as a 'full' download for offline use/distribution including the files, with the URLs in the example sketches replaced automatically using an ant replace task.

After some discussion, the added complications of having to operate and provide long-term support for a dedicated CDN did not seem worth the advantage of reduced up-front download sizes (for this library as well as others), so closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant