Most active commenters
  • yazzku(3)

←back to thread

590 points consumer451 | 15 comments | | HN request time: 0.88s | source | bottom
1. mbil ◴[] No.42161213[source]
This crashes my Safari browser on iOS.
replies(7): >>42161227 #>>42161294 #>>42161301 #>>42161743 #>>42162962 #>>42163108 #>>42174356 #
2. theoretically23 ◴[] No.42161227[source]
Yes, best in Chrome I'm afraid
3. tsumnia ◴[] No.42161294[source]
Firefox ran it, but very broken.
replies(2): >>42161658 #>>42164190 #
4. yazzku ◴[] No.42161301[source]
"Works" on Firefox if you can stomach 300-400ms pauses every 2 seconds.

Edit: I just profiled it and it spends 42% of exclusive time in texImage2D. It would be better to allocate a set of textures up front and then use glTexSubImage2D to update their contents. glTexImage2D allocates a new texture every time.

replies(1): >>42161377 #
5. theoretically23 ◴[] No.42161377[source]
Thanks - should be better now hopefully on Firefox
replies(2): >>42161678 #>>42165640 #
6. ◴[] No.42161658[source]
7. DaiPlusPlus ◴[] No.42161678{3}[source]
Still very stuttery before crashing in Safari on iOS on my iPad :/
replies(1): >>42165150 #
8. consumer451 ◴[] No.42161743[source]
For reference, while it does work much better on my old laptop now, on iOS 18.0.1 iPhone 11 Pro Max, it also crashes until I add https://firehose3d.theo.io/?discardFrac=0.6
9. Angostura ◴[] No.42162962[source]
It’s seems to work fir me ok on 18.1
10. matsemann ◴[] No.42163108[source]
According to the title, perhaps try IE6 on XP ;)
11. wkat4242 ◴[] No.42164190[source]
Weird, for me it worked great on mobile Firefox
12. brookst ◴[] No.42165150{4}[source]
Smooth and stable on iOS DB3 on iPad…
13. yazzku ◴[] No.42165640{3}[source]
This did get rid of that bottleneck and the stutters are slightly better, but it still has some more work to go.

https://ibb.co/LgtJHMs

You'll want to get rid of glTexImage2D completely except for application startup (allocate a pool of N images up front, then re-use them and update with glTexSubImage2D). And short of being able to optimize the text render, which seems to be awfully stupid, you'll want to render offscreen to those textures ahead of time before you need to render them on-screen.

replies(1): >>42167286 #
14. yazzku ◴[] No.42167286{4}[source]
To be fair, you're crazy CPU-bound. This workload is peanuts for a modern GPU and there's no excuse for it not running at 500+ fps. But that's just how JS goes. You'd probably have better luck with C/wasm for this kind of thing if the web is your target.
15. mensetmanusman ◴[] No.42174356[source]
Lasts 5 seconds on iPhone 16 pro max