You’ve taken a thread profile. There’s thousands of nodes. You click “expand all” and perform a search for a specific method. No results.
You scroll down the page. More nodes start to expand.
I already said expand all!
Yes, you did. But if you had thousands of nodes that all tried to display at once, it would likely crash your browser due to all the fancy formatting and instrumentation buttons and settings and etc. etc.
So, the Thread Profiler view uses lazy loading. If you’re not looking at it, it isn’t expanded.
So, what? I’ve got to slowly go through the Thread Profile so everything expands to do a simple search for the method I’m looking for?!
I know! I actually used to do that. Hours spent just trying to get the Thread Profiler to load up just so I could help customers implement Custom Instrumentation. Until I learned:
Appending .json to the end of the Thread Profiler URL will give you the full, raw JSON
For example the url of a Thread Profile looks like:
by simply changing it to this:
We can get the full, raw JSON of the thread profile. This lets us easily search that the method we want is collected. I’ve got a browser extension that formats JSON automatically. This lets me follow back up the call stack so I know where to expand the thread profile to find my method.
Let us know if you found this useful below.