How to profile performance

I’m mostly self taught, however, I am curious how to “trim” the realtime processing of my audio plugin. This is more of a Visual Studio/XCode question though. What is the best way to see the amount of resources my code is using.

I see people posting all over the forum, a bunch of benchwork test sheets of their code, I just don’t have a clue where and how to do that. I think it’s called a profiler?

On macOS there is Instruments, on Windows a small app called VerySleepy. Make sure you build the Release configuration with Debug symbols or you won‘t get too much information out of it.

A few tipps (they apply to both tools):

  • make sure you profile the audio thread and use a long enough measure time (about 20 seconds should be fine)
  • set the root to your plugins entry point
  • look for obvious hotspots by sorting by „exclusive“ (this means the time is actually spent in this method and not in a subcall)
  • then sort by inclusive and compare the usage to what you would expect.
1 Like

We just use the Visual Studio profiler on Windows, seems to work well…?

2 Likes

Thanks, guys I am learning that now, as well as how to trace back leaks.