Ah well it's probably not the last time I need to force some repaints on things so π€·ββοΈ π
#π¬-selective-profiler
π¦ : https://github.com/needle-tools/selective-profiling Deep profile individual methods, filter profiling results, place UI markers in the profiler view.
I do hope that's for debugging only
sure.
What do you think π
Now that you mentioned repainting - I'm extremely stupid. The file size varied in size because of my reparenting script, sorry π
No worries π good to know the reason now π
<@!301034111177326593> welcome!
Im not sure if we can do much here right now. It looks similar for me. And what is shown here is the name of the sample marker. Currently we require a relatively fully qualified name containing the assembly etc. Without it it would require a lot of guesswork and loading types/assemblies. There is still a possibility that we can get some more useful information from the profiler api which is what I'm hoping for
for example in UIElementsUtility this is the marker name
In this case it matches. But for SceneHierarchyWindow I can't find the name, my guess is it exists in native land? Maybe we can still find those types by bruteforce but I'm just a bit worried if that would be stable enough and work reliably enough + increase performance cost when searching
Can we do a preprocessing pass to find those maybe? I'll ping the profiler guys if there's, like, a list of them
To find those types?
Or marker names?
find marker types <> name mapping
You can only iterate marker names that are currently in a frame as far as I know. And there is no type info anymore. I havent had luck with getting any info from GetItemCallstack which would maybe provide enough info to at least not have to search too many types https://docs.unity3d.com/ScriptReference/Profiling.HierarchyFrameDataView.GetItemCallstack.html
zero all the time (doing this with the current framedata in the profiler tree view)
Btw getting callstacks when it's actually enabled in the profiler - which makes sense. So I think I can add at least some more menu items after a little refactor π
Looks promising π
π
heavy nesting
Sneak Peak: performance testing for the Selective Profiler
<@!268763728952950785> just merged a new version into the main branch. If you enable callstacks now you get a lot more methods to profile. But be careful with deep profiling settings. It can easily get to profile hundreds of methods when e.g. deep profiling is set to 5 and enabling it for 15 methods.
<@!268763728952950785> did you try with the new version? π
I've also added "Enable all" options to the submenu items
I'll try it right now
Thanks!
what [debug] postfix means?
that means you have debug mode enabled. thats for me π
you can disable that in the settings
(DebugLog at the bottom)
That seems to be as far as I can get (by adding methods manually in Deep Profile mode)
Using callstacks I can only get SceneHierarchy.OnGUI, and that's it
Here's a better picture
Also, <@!272528485732450305>, I'm currently refactoring my Smart Hierarchy to use Harmony, so it's a little harder to profile. Would you like to test on it? π
Yes surely
The video I posted on twitter: https://twitter.com/marcel_wiessler/status/1380480730317385729
Amazing video compression they got over at twitter π
Yes indeed π
I hope I'll find time soon to check the new stuff out again, but I've been a bit swamped lately
Oh no! No rush but your feedback is always appreciated π
First quick test with colors https://cdn.discordapp.com/attachments/821766134927720548/830117549097746503/2021-04-09-182854.mp4
Testing with visualizing some profiler data in hierarchy and inspector. I'd would ideally also like to click on it the relevant items in the profiler but that doesnt really work very well yet regarding selecting the items in the treeview (as you can see in the video...). There would be minor things to be fixed (like inspector collapsing) but those are very doable
Hierarchy and inspector things do work now. But the treeview selection is... not great
First version of context click on a script file to add profiling to all declared methods
also improved context menu for components adding options to profile/not profile all methods
Hiding all samples with negligible performance impact (e.g. < 0.1ms, < 1 byte alloc): https://www.youtube.com/watch?v=vg9m-IzfKms
Started adding Graph-Labels for special markers you can define (e.g. if you want to highlight UI interaction or special events in your game)
<@!185738491185856512> this is the feedback channel for Needle Profiler! https://github.com/needle-tools/selective-profiling
thanks!
UPM direct link?
Open UPM
This is a git repository. The Needle Profiler isn't uploaded to any registry yet, it's early preview
ok my bad
I misread the readme
actually I didn't
it does mention open upm
Clone this repository and add OpenUPM to your project
I guess it is just for the dependencies
Ah, right. We have to remove that - there was a dependency to OpenUPM but there isn't anymore.
so it's a git package then?
We had a dependency on harmony, which is gone on the latest remove-editorpatching-dependency branch
yes for now
using this link directly? https://github.com/needle-tools/selective-profiling
becuase if so it doesn't like it
Please clone the repo, switch to the remove-editorpatching-dependency branch and then reference it via manifest.
ah right
so an embedded one
Local, yes, while it's in early access π
hmm
it says it's private
I may not have the access to it
I do see it though
so it's probably a problem with my client
weird
today git wants to drive me crazy
Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://github.com/needle-tools/selective-profiling.git Output: Error: remote: Repository not found. fatal: repository 'https://github.com/needle-tools/selective-profiling.git/' not found
You're in the list of collaborators and got read access π€
strange it's not the first private repo I use, I have access the the DOTS ones
but sourcegit doesn't like this one
sourcetree
anyway old fashioned download zip worked
I'll keep an eye here for updates
So you can install it now?
it works, but I couldn't clone it
Selective Profiler is now available publicly! https://twitter.com/marcel_wiessler/status/1537359953018732547
Great to see this being released publicly!
Though when I tried adding the package to our project, we get the following compiler issues:
The type 'TypeDefinition' exists in both 'Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e' and 'Unity.Burst.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=fc15b93552389f74' error CS0433: Assets\Source\Mimimi.Core.Extensions\CodeBaseVisualization\ClassDependencyData.cs(103,56)
The class in question was previously already using Mono.Cecil;, but it seems Unity does a sneaky and includes a Mono.Cecil namespace in their Unity.Burst.Cecil library. Any ideas how to fix this?
π we'll take a look - the usual solution is that we need to properly prefix assemblies and make all dependencies explicit.
Alright, I'll remove the package for now. Let me know if you need any more info.
Thanks for reporting!
<@93804453479579648> try 1.0.1-pre if you like, I removed the cecil dependency which was pulled in but not actually needed anyways so it should work with burst now (tested in 2020.3.33f1 and burst 1.6.6)
hi there, I'm looking into using this awesome package for better profile my mesh gen algorithm, how well does it handle threading?
Profiling is still handled by unity, the package injects profiler sample marker for you into the code that you can dynamically add/remove via the profiler hierarchy so is the result is the same as if you would add the markers in your code permanently