Skip to main content
GameDev.net gamedev.net
Official Announcement

This is an official announcement from Godot Engine. Information comes directly from the source.

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Godot Engine
Godot Engine Official
11 hours, 26 minutes ago • Clay John

Optimizing CPU-side Rendering Code

Briefing

Godot is continuing to optimize the CPU side of its renderer, and one recent Polygon2D investigation shows how quickly a seemingly small scene can become expensive. In a test on a Ryzen 5 9600X, a setup with roughly 20 animated characters was already hitting a wall, with 15.7 ms spent in Polygon2D::_notification() and another 11.7 ms in drawing work.

The key issue was not just animation cost. The renderer was repeatedly creating and freeing vertex arrays every frame, with about 3.3 ms spent building them and 5 ms spent freeing them. That kind of churn is exactly the sort of hidden overhead that can make a game feel inexplicably slow even when the GPU is not the main problem.

The broader takeaway is that renderer optimization is a process of profiling, understanding the bottleneck, changing the code, and then measuring again. Godot is using external profiling tools like Superluminal alongside its own editor profilers and Tracy support to track down these CPU hotspots. For developers, every engine-side win translates into more headroom for gameplay, animation, and content on the same hardware.

This also reinforces a practical rule for engine work: CPU and GPU tradeoffs have to be balanced per use case. 2D batching, 3D occlusion culling, and mesh rebuild behavior all affect where the frame time goes, and the wrong choice can quietly dominate performance long before a project looks technically demanding.

“Optimizing rendering code isn’t as scary as it sounds.”

— Godot engine developer · Framing the optimization process
At a glance
what
Godot is optimizing CPU-side renderer code, with a Polygon2D case exposing heavy per-frame mesh churn.
who
Godot engine developers; Aurélien Condomines, working on Heidi’s Legacy: Mountains Calling, reported the slowdown.
when
The optimization work discussed was done this year; the profiling test used a Ryzen 5 9600X.
impact
A scene with about 20 animated characters was already spending 15.7 ms in Polygon2D::_notification() and creating/freeing vertex arrays every frame.
Signal Mixed

Good optimization progress, but it reveals serious overhead.

Original source
Read on Godot Engine
Discuss

Discussion

Loading comments...

Recommended resources

Graphics Programming Resources

See full guide
Real-Time Rendering, Fourth Edition cover
Editor pick Community pick

Real-Time Rendering, Fourth Edition

Amazon · Book

Real-Time Rendering combines fundamental principles with guidance on the latest techniques to provide a complete reference on three-dimensional interactive computer graphics. It will help you increase speed and improve image quality and learn the features and limitations of acceleration algorithms and graphics APIs. This latest fourth edition has been updated to include a chapter on virtual reality and augmented reality and covers new topics such as visual appearance, global illumination, and curves and curved surfaces. It is for anyone serious about computer graphics who wants to learn about algorithms that create synthetic images fast enough that the viewer can interact with a virtual environment.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.

Programming with wgpu in Rust cover
Editor pick

Programming with wgpu in Rust

Amazon · Book

Unlock the full power of modern graphics programming with wgpu and Rust. This comprehensive guide takes you from foundational GPU concepts to advanced real-time rendering and compute techniques—equipping you to build fast, safe, and cross-platform graphics applications. Written for intermediate to advanced Rust developers, this book provides clear explanations, hands-on examples, and detailed insights into how GPUs process and render data. You’ll explore everything from the fundamentals of buffers, shaders, and pipelines to advanced topics like deferred rendering, shadow mapping, and GPU compute workloads.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.