# web audio decoding ## `decodeAudioData` costs memory by duration, not by file size a compressed file is small; the PCM the browser produces from it is not. stereo float32 at 44.1 kHz is about 21 MB per minute of audio, and the decoder's working memory on top of that makes the transient several times larger. measured in chromium, the browser process tree grows by roughly **100 MB per minute of audio** for the duration of the decode, then frees it: a 4-minute m4a (5.8 MB) cost about +550 MB, an hour-long one (85 MB) about +6.9 GB. that transient, not the retained buffer, is what kills a mobile tab. so a waveform-from-file feature needs a cap on **duration**, read cheaply from the container header first (an `