-
Notifications
You must be signed in to change notification settings - Fork 75
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
Show/hide thread lanes and make them collapsible #97
Conversation
14ed357
to
c4824ec
Compare
On the screen the thread list seems to take a significant vertical place. |
Maybe like a collapsable settings bar? All settings could be under this bar in a panel. |
I think it's good to have some settings accessible without need to unfold. As alternative, I would like to be able to fold/unfold thread display directly in flamegraph. |
like that idea as well! Will give it a try and see the possibilities there |
Tho need to find a way on how to persist the settings. Expect it to be a bit more tricky doing it that way. |
I don't know how persistent settings work in puffin (viewer ?). |
@gwen-lg you seem to sugegest you somewhat implement it? I have it somewhat working, only missing arrows, but the whole thread section is not using |
Yes, I was thinking yesterday that use But with the existing, I have copy and adapt the code of the
An wanted part of my version is than arrow icon and thread name are a unique block, and all than block is clickable. |
My test, based on your work is also available here : https://github.com/gwen-lg/puffin/tree/hide-threads-flamegraph_test |
Alright. I went for the arrows from here: https://docs.rs/egui/latest/egui/special_emojis/index.html, instead of painting them in code. Most of the UI is similar to before, but I split the settings panel into two columns. I now have:
Collapsible threadsWhen one clicks on thread name, the thread lane is collapsedsed. Hiding possibilityWhen the checkbox is selected, the thread is completely hidden. |
@TimonPost : can you "clean" commits ? Note: if you use VSCode/VSCodium, you kown the "editor.formatOnSave" settings option ? |
632a560
to
5dc144b
Compare
Maybe can enable that config setting project-wide, but will def. do it in my own editor as well. It's indeed slightly annoying to find out that after CI ran fmt wasn't run. I squashed merged commits and rebased the branch, I dont really want to bother cleaning every single commit up as the CI will do a squash merge anyways. |
no need to clean up the commits @TimonPost , we squash merge |
5dc144b
to
e8e9e7d
Compare
nice! what do you think about making a new release?
|
@emilk yes that sounds like a good idea and is in the queue. Need to update change logs and then I can do a release. Maybe I might want to sneak in a few other changes but could be done later as well. |
Checkboxes for hiding and showing puffin flame graph threads.
The collection is stored in
Options
as it is nice for it to be saved upon application closing. Also used index map such that order is preserved, we get fast insertion and reading, and only get unique thread entries are shown in thje checkbox list. By storing it inOptions
we do generate an index map that gets extended longer and longer with time as all threads from all profiled puffin files/applications eventually end up in there. Tho as we still iterate through the currently selected frame threads those other threads do not show up in our checkbox list. Think its not to big of a deal.New option to disable thread lanes:
Collapsable threads: