Skip to Main Content
Talk Beginner MIT License First Talk

Optimizing Performance of GUIs

Proposal status is Approved
Session Description


The <div> on the left is identical to the <div> on the right and yet the one on the left renders 1.5x faster than the one on the right. This happens because each pixel of the <div> on right requires the context of the pixel under it as it is not completely opaque, on the other hand the <div> on the right doesn’t even need to render the pixels under it. Having many them can unknowingly butcher the performance of your UI.

We at Mecha are building a GUI Library for the Mecha Comet, and we have found that there is a lot hidden under hoods of GUI Libraries that let’s them render any kind of UI efficiently. I am going to go over a few algorithms and concepts like early-z discard, painter’s algorithm, alpha blending and damaged rendering that are implemented in GUI Libraries like Flutter and even in the engine behind Chromium to improve the performance of UIs. We will also go over how they integrate with each other — how a single design choice (like whether a surface is opaque or translucent) decides which of these optimizations the renderer can use. Without these algorithms it would be prohibitively expensive to render the kinds of UI we see everywhere at a reasonable resource usage.

Now that the listeners have an understanding of the above concepts, I’ll go over how they can use these concepts to improve performance of UIs in the design phase and/or the development phase. I’ll go over elements that just improve the performance without any drawbacks, and also talk about the hidden costs of using certain element so listeners can consciously pick them rather than unknowingly paying the price.

Key Takeaways

From this talk listeners will take away:
- Foundations of GUI Rendering.
- Concepts that help optimize GUI Rendering.
- These are concepts that are implemented within GUI libraries. We’ll Discuss how can we use this concepts outside the context of the library, in the design or usage of the library.

References

Session Categories

Technology architecture
Talk License: MIT License

Which track are you applying for?

Main track

Speakers

Naman Agrawal
Naman Agrawal Rust Developer | Mecha Systems Pvt Ltd

I'm a Systems Engineer at Mecha Systems, where I lead the Mechanix Launcher and Compositor for the Mecha Comet (mecha.so/comet) . Most of my time goes to making interfaces feel fast on hardware that gives you very little to work with.