generated from EmbarkStudios/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Don't merge scopes that have non-matching dynamic data #73
Labels
enhancement
New feature or request
Comments
Unrelated note: I wasn't aware of "dynamic data", but can perhaps utilize this to resolve #60 in some way. |
ah yes! didn't know we had an issue on it, was just a 10 min fix. will mark it resolved by my PR |
repi
added a commit
that referenced
this issue
Oct 19, 2022
Previously we would merge all scopes that have the same `id`, but if you have multiple scopes after each that have same `id` but different dynamic `data` field they would be merged together and we wouldn't display the `data` field. This is something we ran into in our codebase that made it harder to see why a certain heavy operation was happening as we were missing the context for it. Which we did specify but was merged together and not shown here as merging scopes is on by default (and is a general good idea). Adds a simple visual test for in the imgui and egui clients. Resolves: #73 ## Example This is how it looks like now: ![image](https://user-images.githubusercontent.com/1262692/196470164-64076531-647c-48dc-84d3-7bb1a3d502a6.png) from the following code: ```rust // test to verify these spikes timers are not merged together as they have different data for (name, ms) in [("First".to_string(), 20), ("Second".to_string(), 15)] { puffin::profile_scope!("Spike", name); std::thread::sleep(std::time::Duration::from_millis(ms)) } // these are however fine to merge together as data is the same for (_name, ms) in [("First".to_string(), 20), ("Second".to_string(), 15)] { puffin::profile_scope!("Spike"); std::thread::sleep(std::time::Duration::from_millis(ms)) } ``` Before this PR this would have been a single "4x Spike"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Scopes can have dynamic data, like this:
However, puffin's UI still happily merges blocks with different dynamic data together if merging is enabled. It would be nice with a mode that would only merge identical blocks if their dynamic data is also identical, not if it's different.
The text was updated successfully, but these errors were encountered: