bevyengine / bevyengine/bevy

Split prepare_windows span to communicate when we're waiting for vsync

Open
#18,724 3 comments 0 reactions 0 assignees View on GitHub
A-Diagnostics A-Rendering C-Usability D-Complex S-Ready-For-Implementation X-Uncontroversial
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

> prepare_windows usually means it's either waiting on the / bottlenecked by the GPU, or just waiting for vsync
> So if GPU work is sub 1ms, then you're probably just hitting the display's refresh wait

By @JMS55.

This is an important and non-obvious quirk of our tracy profiles.

Ideally we could have `waiting_for_vsync` and `waiting_for_gpu` spans here to make the problem (or lack thereof!) much more obvious to users getting started with profiling their apps.

Contributor guide

Open the contributing guide

Research direction

Start by locating the prepare_windows span in the rendering or frame-pacing code and inspect how it distinguishes GPU work from the display refresh wait. Define separate waiting_for_vsync and waiting_for_gpu spans so Tracy profiles communicate which wait is occurring, then verify the resulting profiling behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.