-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Periodic Stutters on some Mac hardware #3709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I tried running branches |
Whoah! I've got access to a first-gen M1 -- I can try that as well for another data point. |
I enabled the bevy "trace_tracy" and ran road_race from the "choppy" branch. (2021 m1 mac) Tracy lets you sort all "frame" spans by execution time. One particular long (34ms) frame looked like this: With the full name of that bottom-most "RenderDevice" span being:
And lasting 24ms. I don't really know how to interpret this. |
@rparrett Is there a doc somewhere that I can read to learn how to get set up with the tracing stuff? The 0.6 news post just mentions the Update: Naturally, right after I ask the question I finally figure out the building step. Sort of. There are hints at the bottom of page 18 in the PDF user manual (sheesh, talk about buried -- put it on the readme, folks -- or better yet add it to homebrew). Here's what I did to build the tracy profiler on macOS:
This builds a binary called Then I added the
Then you click on the line with your program's name ( |
Yeah, no kidding. It's not too bad though:
But if anyone has any tips for actually using Tracy well with a touchpad, I'm all ears. |
Thanks! Now I've just got to figure out which older version of Tracy corresponds to "protocol version 46" |
I'm using tracy tag v0.7.8 to build locally and it works with Bevy
Have a very steady hand when scrolling horizontally |
Thanks! I updated my instructions above. Now my challenge will be to learn how to use this thing. I get the feeling that this will be a valuable skill in my future life using Bevy. Maybe I can find some helpful info to add to this issue tonight. |
Any tips on how best to use the Tracy Profiler UI? |
Last night I profiled on the M1 for about 20 minutes. Ironically, it ran much more smoothly with the tracing enabled. At the end I figured out how to use the search to identify the longest frame, which was only ~42ms. 🤷🏻♂️ I need to try it on the Intel box. |
Just enabling the
If you zoom out a bit, you'll notice that those two threads are not active with those two items at the same time in any of the well-timed frames: I have no idea where to go from here. |
I don't think this is something Mac-specific: Toqozz/bevy_debug_lines#14 (comment) |
Resolved in Bevy 0.8 |
@CleanCut which PR is the fix for this? |
Most likely #4744 |
Bevy version
The problem is on both:
0.6.0
main
branch (3fcdc5a at the moment)Bevy
0.5.0
did not exhibit this problem.If I add the plugins from either of the projects below, then I get periodic stuttering / dropped frames. I'm speculating this has something to do with the big rendering overhaul plus these plugins using custom shaders (?).
bevy_prototype_debug_lines
bevy_prototype_lyon
Note: I don't have to use the plugins to see the problem (though I do use them in the code provided)! Just adding the plugin
app.add_plugin( ... )
is enough to trigger the problem in my testing.Operating system & version
Here's the specs for my workstation with the problem.
I also tried Rust 1.57 -- no change. I've run
cargo update
to make sure I'm using the latest crates.io dependencies -- no change.NOTE: This very similar system does NOT show the problem, or at least I can't reproduce it. I don't know whether the difference is the OS revision, the specific hardware, or something else.
What you did
What you expected to happen
No stutters.
What actually happened
Stutters.
Additional information
I originally thought this was a bug in
bevy_prototype_debug_lines
, so I filed an issue with that project.There are 5 tags/branches in the
CleanCut/rusty_engine
repository you can check out if you like. They're all exhibit the stutter for me except the first one:smooth
tag uses neither plugin - Update: Though this didn't stutter on my Intel machines, we discovered it still stutters on Apple M1 and M1 Max machines.choppy
tag isbevy_prototype_debug_lines
with Bevy0.6.0
bevy-main-debug-lines
branch isbevy_prototype_debug_lines
with Bevymain
choppy-lyon
tag isbevy_prototype_lyon
with Bevy0.6.0
bevy-main-lyon
branch isbevy_prototype_lyon
with Bevymain
If you prefer an example where you don't have to dodge obstacles, you can run:
cargo run --release --example collision
C
key to turn on the debug lines (it doesn't make a difference, but the debug lines are what I'm trying to implement nicely)The text was updated successfully, but these errors were encountered: