Skip to content

Reduce library size by using shorter example audio files #66

Closed

Description

@kevinstadler

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)

Activity

  1. kevinstadler commented on Sep 6, 2023

    @kevinstadler
    CollaboratorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions