Guide for customers to help their partner with troubleshooting Business Central

Inside every Business Central, there’s a wonderful hidden tool called the Performance Profiler. With the Performance Profiler, any user can start self-diagnosing performance (and other) issues. You can also send the recorded profiler output to your partner to turbocharge their work. Check out this video to see how to use the profiler:

https://youtu.be/Y6n70-ZSlwY

In this video, Erik demonstrates how Business Central customers can use the built-in Performance Profiler to troubleshoot slow operations and provide valuable diagnostic information to their development partners. He walks through a real scenario where posting a sales invoice is taking too long, shows how to capture a performance profile, interpret the results, and send the data to a developer for further investigation.

The Problem: Something Is Slow in My System

A question Erik gets asked frequently is: “I think there’s an issue with my system — what can I do?” The good news is that as a Business Central customer, there’s actually quite a lot you can do before reaching out to your partner. Whether you have custom apps running or your partner has built customizations, you have tools at your disposal to figure out what’s going on.

In this example, Erik demonstrates a common scenario: posting a sales invoice has become noticeably slower, and the more lines on the invoice, the longer it takes. That doesn’t seem right.

Quick First Step: Try Refreshing

When you encounter an error, one of the simplest things you can try first is pressing F5 to refresh and see if the error goes away. Sometimes errors are transient. But if the problem persists — like in Erik’s demo where he gets an “unexpected error occurred after database command was cancelled” message — it’s time to dig deeper.

Introducing the Performance Profiler

The Performance Profiler is a built-in Business Central tool designed specifically to troubleshoot slow operations. To find it, simply search for “profiler” in the Business Central search bar, and you’ll see the Performance Profiler option.

Setting Up the Profiler

Erik recommends using the tear out function to pop the Performance Profiler into its own separate window. This way, you can keep your normal Business Central workspace open alongside the profiler. The workflow is straightforward:

  1. Open the Performance Profiler and tear it out into its own window
  2. Click Start — the profiler immediately begins sampling what’s happening in your system at an interval of a few milliseconds
  3. Switch back to your Business Central window and perform the slow operation (in this case, pressing F9 to post the invoice)
  4. Once the operation completes, go back to the Performance Profiler and click Stop

While sampling is active, Business Central is constantly checking: “What’s happening? What’s happening? What’s happening?” — building up a detailed picture of where time is being spent.

Reading the Results

Once the profiler stops, it presents a breakdown of time spent across different apps and extensions. In Erik’s example, the results showed:

  • Base App — This is core Microsoft code where the sales order logic, screens, and posting routines live
  • World’s Best App — Two full seconds spent here, which is suspicious
  • Subscription and Recurring Billing — A new Microsoft app in BC25. Even though it wasn’t activated in this company, code was still running. Erik notes that if you’re not using it, you might want to uninstall it to shave time off operations
  • Exclude Business Events — An internal Microsoft app you cannot change
  • Business Foundation — Handles things like number series that Microsoft is gradually pulling out of the base application

A word of caution: the very low numbers in the profiler aren’t always perfectly representative. Because the profiler samples at intervals, something that runs very quickly between samples might not be captured. However, the big buckets are reliable and give you a clear picture of where the significant time is being spent.

Diving Deeper: Technical Information

You can click Show Technical Information to get more detail. The bar graph transforms into a pie chart view, making it even more obvious where the bottleneck is. In this case, the “World’s Best App” stood out prominently.

Time Spent by Function

The profiler also lets you see time spent in different functions across the system:

  • Dimension Management: 221 milliseconds — probably fair
  • Tax calculations: 218 milliseconds — seems reasonable
  • A function called “test” from World’s Best App: 2 full seconds — definitely suspicious

The Call Tree

The most detailed view is the Call Tree, which shows exactly what happened and in what order:

  1. You clicked Post (action on the sales order list) — 5 seconds total
  2. That calls into Post Document
  3. Which runs a sales check, then sends to posting
  4. Sales Post runs, going through multiple layers (as Erik notes: “This is how developers work — there are so many layers to get to actually posting”)
  5. Process Posting → Process Post Lines → Post Sales Line
  6. On the “On After Round Amount” event: there’s the procedure from World’s Best App, consuming 2 seconds

Through three different views — the app breakdown, the function time analysis, and the call tree — the same culprit was identified. And because it runs on each line, the more lines on an invoice, the more time gets wasted.

Identifying the Problematic App

To figure out exactly what “World’s Best App” is, navigate to Extension Management in Business Central. In Erik’s demo, the app was listed as “World’s Best App” by “A Sketchy Developer” — his humorous example. In real life, this is where you’d identify the publisher and version of any app causing issues.

Sending the Profile to Your Developer

Here’s where you provide real value to your partner. From the Performance Profiler, click Download. This generates a file with a name like performance-profile-92.alcpuprofile. You then email this file to your development partner.

What the Developer Sees

When the developer receives the file, they can place it in a snapshots folder within their VS Code project. The file opens directly inside VS Code, where the developer can:

  • See the same profiler views — app breakdown, time by function, and call tree
  • Navigate through the call tree to find the problematic code
  • Click directly on the function to jump to the source code

In Erik’s demo, the source code revealed a simple 2-second sleep/delay that had been inserted into the “On After Round Amount” event — executing on every sales line during posting. While this was a contrived example, the same workflow applies to real-world performance issues.

Practical Tips and Use Cases

Helping Your Partner

Sending a performance profile to your development partner is a tremendous amount of help. It’s the best way to give them concrete information about what’s going on in your system. Any reputable partner will love receiving a profile along with a message like: “Hey, this is weird — something is going on. Can you take a look?”

Evaluating Apps from AppSource

The Performance Profiler isn’t just for troubleshooting existing problems. If you’re evaluating different apps from AppSource, you can use it to check whether an app has a performance impact on critical operations like posting invoices. Run the profiler, see what apps are contributing to processing time, and make informed decisions.

Removing Unnecessary Apps

As Erik discovered with the Subscription and Recurring Billing app — even though it wasn’t activated in his company, it was still consuming about a quarter of a second during posting. If you’re not using an app, consider uninstalling it to eliminate unnecessary overhead.

Summary

The Performance Profiler in Business Central is a powerful yet simple tool that every customer should know about. The workflow is straightforward: open the profiler, start it, perform the slow operation, stop it, and review the results. You can identify which apps are consuming time, see exactly which functions are slow, and trace through the full call tree to pinpoint the issue. Most importantly, you can download the profile as a file and send it directly to your development partner, giving them everything they need to diagnose and fix the problem efficiently. It’s one of the most impactful things you can do as a customer to help keep your Business Central environment running smoothly.