nypublicradio / audiogram

Turn audio into a shareable video.
MIT License
943 stars 335 forks source link

Optimize Memory and Performance in waveform.js #127

Open mplawner opened 1 year ago

mplawner commented 1 year ago

This pull request introduces a series of optimizations aimed at improving the performance and memory usage of the waveform.js file. The changes focus on pre-allocating arrays where possible, optimizing array manipulations, and replacing library-specific methods with native JavaScript alternatives where appropriate.

Key Changes:

These changes aim to enhance the performance and reduce the memory footprint of the getWaveform function, especially when working with large audio files.

Please review and test these changes thoroughly to ensure they meet all functional and performance requirements.

TworkC commented 10 months ago

Do you have this building successfully locally or through docker? I've been running into issues with the original branch on Docker.