Hacker News new | ask | show | jobs
by thrax 2611 days ago
Immediate mode uis are fine for debug displays or for displaying data that's changes every single frame, but for anything else, in a shipping product they are just a waste of resources. The primary wasters are excess memory allocation, string generation, and the sheer amount of redundant function calls. Anything you do to address those problems result in converting your ui to a retained mode UI. For those advocating react like approaches to solving this.. similar problems are involved. Diffing state is wasting cycles unless it's done so optimally and carefully that it becomes a technical feat and ends up being as complex as just doing something retained. Source: game developer for 25 years on console, desktop, and mobile.