Re:Terminal app built over WebGPU, WebAssembly and Rust
by Tade0 on Wednesday May 24, 2023 @11:23AM
(#36059389)
Rendering text is surprisingly resource-intensive.
10 years ago I was tasked with making a mobile browser game and the thing that took 30% of the time when rendering a frame were the few bits of text that were there to display the score etc.
Once we started heavily caching text, performance increased considerably.
Re:Terminal app built over WebGPU, WebAssembly and Rust
by flashback2199 on Wednesday May 24, 2023 @11:31AM
(#36059500)
Isn't rendering text inside a graphics framework and then saying that rendering text is surprisingly resource-intensive a bit like implementing an O(n log n) algorithm with nested for-loops and saying that the problem domain is surprisingly resource-intensive? Surely the thing that was causing text rendering to be resource-intensive was doing it inside a graphics framework?
Re:Terminal app built over WebGPU, WebAssembly and Rust
by littlestymaar on Wednesday May 24, 2023 @11:52AM
(#36059809)
Rendering text, is resource intensive.
If you don't rotate or zoom, then most of the work can be cached (at least when using latin fonts with few ligatures) which make things appear to be fast, but if you tried to render text in real time without caching (because you're allowing rotation and zoom, and you can't cache everything) then you'd see how expensive it is.
Re:Terminal app built over WebGPU, WebAssembly and Rust
by flashback2199 on Wednesday May 24, 2023 @12:53PM
(#36060845)
Okay, sure, rendering text that meets modern expectations is resource-intensive.
Re:Terminal app built over WebGPU, WebAssembly and Rust
by eschaton on Wednesday May 24, 2023 @10:34PM
(#36066469)
Also why do it in JavaScript in a web page? So much waste for something that literally didn’t require a CPU at all back when they were first created. (Terminals were originally implemented via state machines with pure logic.)
What webgpu needed is graphics drawing applications are most graphics drawing apps on web are still using canvas 2d or SVG, not even webgl.
If we are to build a graphic heavy tool like figma - all choices we have are mostly SVG.