As a Salesforce Architect, I understand the importance of having seamless, high-performance applications on the Salesforce platform.
That’s why I’m excited to help you explore ApexGuru – a game-changing innovation that allows you to proactively assess and resolve any performance issues in your Apex code, using actionable and org-specific AI-driven insights.
What Is ApexGuru?
ApexGuru is the first step towards AI with Scale Center’s revolutionary generative feature. It is an incredible functionality to build scalable solutions on the Salesforce platform.
This solution uses runtime profiles to gather information and provide helpful guidance on improving your code. It offers actionable insights and prescriptive recommendations to optimize your code for better performance. In short, ApexGuru addresses anti-patterns and hotspots in the Apex code based on runtime profiling and provides code optimization recommendations.
- Anti-patterns: Anti-patterns are coding practices that diverge from Salesforce recommendations and best practices, potentially resulting in exceeding various governor limits and causing performance degradations, which in turn can lead to ‘hotspots’.
- Hotspots: Hotspots refer to specific areas within a Salesforce org that encounter performance bottlenecks or inefficiencies caused by poorly designed custom Apex code and data models. These hotspots can have a significant impact on the overall responsiveness and scalability of the application.
How Do I Enable ApexGuru?
ApexGuru is simple to set up using the following steps:
- Scale
- Scale Insights
- ApexGuru Insights
Please note that there is no checkbox or a toggle button to enable it. The agreement window pops up after clicking the “ApexGuru Insights” from the Setup.

Once you click “I accept”, analysis will start immediately.

ApexGuru Insights
Once the analysis is complete, ApexGuru will provide various insights. The insights are divided into four categories:
1. Code Recommendations
It analyzes the code in the org and offers feedback, categorizing recommendations into three levels (Critical, Major, and Minor) and specifying class names and line numbers. To add the finishing touch, it also provides the recommended code.

Here’s an example of a recommendation:

2. SOQL/DML Analysis
It inspects the SOQL/DMLs in the code and highlights potential issues.
Here’s an example of a recommendation:

3. Expensive Methods
Expensive Methods enable us to obtain a comprehensive overview of the methods that consume the most CPU time. The tool identifies methods that expend over 5% of CPU as critically expensive and highlights methods using 2-5% of CPU as expensive.
Armed with this information, you can optimize these methods to enhance their performance, thereby improving the scalability of your organization. These insights are based on your most recent 15 days of usage, ensuring that you have access to the latest runtime telemetry and can make informed decisions based on up-to-date data.

4. Unused Classes and Methods
Last but not least, ApexGuru highlights classes and methods that are not currently being used. This helps reduce technical debt and avoid exceeding Apex character limits.

Note: As of now, there is no way to download the report. The feature is expected to be added soon as per the Salesforce support.
How Often Will ApexGuru Provide Insights?
Once the ApexGuru agreement is accepted, the report is scheduled to run once every seven days from the datetime first run.

Availability
ApexGuru is generally available from the Spring ’24 release for Unlimited Edition (UE), Full Copy Sandbox, Signature, and Scale Test customers.
Considerations
- Initialising ApexGuru has no impact on org performance or storage limits.
- Customer code is not used for training the ML models for ApexGuru.
- The AI models that power ApexGuru look at your Apex code to provide high-impact recommendations.
- ApexGuru isn’t supported in Government Cloud Plus.
Summary
ApexGuru is an excellent solution for enterprise customers looking to maintain a stable and scalable Salesforce org without incurring any additional costs. Instead of relying on end-users to report performance issues, with ApexGuru one can proactively run periodic checks based on the organization’s deployment cycles as it reports based on runtime profiling.