-
Notifications
You must be signed in to change notification settings - Fork 2
Performance Tuning
Isthimius edited this page Jun 22, 2026
·
1 revision
Gondwana already gives you a lot of leverage if you follow its intended model.
The biggest performance win is simple: preserve the dirty-region model whenever possible.
- prefer small targeted world invalidations over full-scene refreshes
- avoid unnecessary camera or viewport churn
- keep parallax layers cleanly separated
- use bitmap backbuffers when dirty-region redraw is the goal
- use GPU backbuffers when full-viewport redraw is acceptable and presentation overhead matters more
These commonly trigger full refresh behavior:
- camera motion
- viewport resize
- viewport zoom changes
- layer z-order changes
- layer parallax changes
- layer origin changes
- visibility toggles
- debug overlays like grid lines or collision boxes
If you are tuning, pay attention to:
- how often
FullRefreshNeededis set - how large refresh queues get
- how large the backbuffer dirty rectangle becomes
- CPS/FPS sampling results
If performance is poor, first ask:
- am I invalidating too much?
- am I moving the camera every cycle?
- am I on the right backbuffer type?
- am I drawing too many overlays as view-level direct drawings?
Gondwana/Rendering/RefreshQueue.csGondwana/Rendering/RenderSurfaceHost.csGondwana/Rendering/Backbuffers/BackbufferBase.csGondwana/Engine.cs