frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

I underestimated how hard audio waveforms are in the browser

5•syncara•21h ago
A few months ago I thought displaying an audio waveform in the browser would be a weekend project.

I was wrong.

The first prototype worked fine with short audio clips, but everything fell apart when I tried loading recordings that were several hours long.

Memory usage exploded.

The UI became unresponsive.

Zooming was painful.

Even generating waveform peaks took longer than expected.

What surprised me most is that the actual challenge wasn't decoding audio. It was rendering and managing huge amounts of timeline data efficiently.

I ended up experimenting with Web Workers, IndexedDB caching, virtualized rendering and progressive loading strategies just to keep the browser responsive.

For those who have built browser-based audio tools:

What was the hardest performance bottleneck you encountered?

Was it decoding, rendering, memory management, or something else entirely?

Comments

Nikolaus018•10h ago
The DOM chokes so fast if you try to render thousands of SVGs or divs for this.

If you haven't already, just dump the data into an HTML5 <canvas> using requestAnimationFrame. Pulling the byte frequency data from the Web Audio API and drawing it straight to a canvas buffer is pretty much the only way to keep it at a smooth 60fps without killing the browser.

dostick•9h ago
Do you mean rendering realtime visualisation, or static map representation of the audio?

Ask HN: What was your "oh shit" moment with GenAI?

90•andrehacker•23h ago•250 comments

Ask HN: What is your (AI) dev tech stack / workflow?

107•dv35z•7h ago•100 comments

Bad MCP design costs your agent 5x more tokens

9•JohnnyZhang483•19h ago•0 comments

Ask HN: My competitors have flawed products but I can't get traction

5•saveitincork•21h ago•5 comments

Ask HN: Are orbital data centers possible / a good idea?

20•aronowb14•6h ago•36 comments

Ask HN: So what happened to Facebook "localhost" tracking?

99•juliusceasar•1d ago•99 comments

Ask HN: Why isn't AI image generation closely linked with graphics code gen?

2•amichail•9h ago•1 comments

Ask HN: Is the web for machines (/llm.txt) the one we wished we had as humans?

35•sunshine-o•12h ago•54 comments

Ask HN: How did you discover Hacker News?

5•chistev•8h ago•8 comments

Ask HN: How do you find deep technical content?

36•f311a•1d ago•26 comments

Ask HN: Gin rummy strategies

24•bix6•1d ago•4 comments

Ask HN: How do you stay up to date without information overload?

3•bohdanstefaniuk•6h ago•2 comments

Ask HN: Who is hiring? (June 2026)

239•whoishiring•4d ago•424 comments

Ask HN: Is Azure capacity this constraind or am I doing it wrong?

10•lanycrost•12h ago•12 comments

Ask HN: Who wants to be hired? (June 2026)

149•whoishiring•4d ago•523 comments

Ask HN: Do you know any company that's making money with LLMs?

4•camillomiller•15h ago•2 comments

Ask HN: Is Everyone an Engineer Now?

4•piratesAndSons•22h ago•6 comments

Supply chain attack alert: .github/setup.js

16•antihero•13h ago•10 comments

I'm tired of LLM skill slop, so I built mine with regression tests

5•iliaov•1d ago•0 comments

Life saving / first aid posters

36•cpu_•3d ago•3 comments

I underestimated how hard audio waveforms are in the browser

5•syncara•21h ago•2 comments

Ask HN: Hey, you, tech worker–how are you feeling?

5•arm32•1d ago•11 comments

Being privacy-conscious comes with some downsides

7•wqtz•1d ago•4 comments

Ask HN: Is Claude Code down, or its just my region?

4•codetiger•15h ago•1 comments

Google killed my $1M ARR startup overnight

14•vadumo•1d ago•9 comments

Ask HN: Good books/resources for learning SQL?

5•CobaltFire•1d ago•3 comments

Ask HN: AI efficiency in the workplace

3•localhoster•1d ago•5 comments

Ask HN: A Brief History of LLMs

9•menomatter•2d ago•6 comments

Tell HN: Max messenger app removed from App Store

9•secondary_op•1d ago•4 comments

Ask HN: What is your opinion on index rule changes to accommodate Mega-Cap IPOs?

18•figmert•3d ago•11 comments