4 ms·
Could you possible share the source to your two examples? I'd love to see how much is accidental complexity vs actual complexity, compared to how web UIs (and o
by capableweb 5y ago
Could you possible share the source to your two examples? I'd love to see how much is accidental complexity vs actual complexity, compared to how web UIs (and other similar paradigms) can be built almost in an almost fully declarative way.
- paulshen 5y agoHere's the main file of the tictactoe implementation. https://gist.github.com/paulshen/b04db68c754f73e693cd29a481c9ebea https://gist.github.com/paulshen/b04db68c754f73e693cd29a481c... `update` is similar to React's render function except here it's being called on every interaction (eg mousemove tick) and redrawing the entire screen from scratch! The code runs so fast that this is fine from a perf standpoint. Note that egui has a reactive or continuous mode. You can rerender everything from scratch 60fps (continuous mode) and it'd be fine in most cases.
- brundolf 5y agoPart of what makes the DOM slower by comparison is the fact that it supports such advanced, declarative, adaptive layouts. There's a tradeoff for having that vs not having that