Menu

📰
0

[AskJS] Has our reliance on WASM made us lazy about native JS performance?

Reddit r/javascript·u/Practical-Departure3·about 1 month ago
#Wv5whTcb
#wasm#native#feel#object#article#discussion
Reading 0:00
15s threshold

[AskJS] Has our reliance on WASM made us lazy about native JS performance? I'm starting to feel like we've collectively given up on native JS for anything heavy. I’ve been digging into the PDF spec lately and everyone told me that if I wanted to handle 500MB+ files in-browser, I’d need a huge WASM/Rust blob to avoid crashing the tab. But I tried a different approach instead of loading the full object graph (O(n) overhead), I’m just using recursive offset mapping on a raw binary slab to patch the file directly. I work as a security dev for a bank, so I'm usually paranoid about memory and heap spray. On a 650MB test file, the logic takes like 100ms and my heap growth is literally 0.0 KB. GC impact is under 2ms. Even got the predicators working via a windowed decompressor in raw JS. It passes qpdf audits perfectly. Are we actually hitting a wall with JS, or is it just that nobody wants to fight with memory lanes anymore?…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More