The author discusses improving texture atlas allocation in WebRender, focusing on the atlas allocation algorithms. They delve into the guillotine algorithm and its implementation in the guillotiere crate. Visualizing the program state using SVG is highlighted as a powerful tool. They explain the methodology used to test algorithms and optimizations outside of Firefox, such as using Cargo Fuzz. The author explores improvements to the slab allocator, separating glyphs and images to reduce the likelihood of batching issues. Finally, they experiment with shelf packing allocation strategies using the etagere crate. The author shares insights into their process of tackling performance bottlenecks and improving texture memory usage in WebRender/Firefox.
https://nical.github.io/posts/etagere.html