Platform
ApexGuru: reading Salesforce's AI performance insights and acting on the right ones
ApexGuru scans your org's Apex and ranks the slow, expensive, and redundant code by runtime cost. The value is in reading its list as a priority queue, not a to-do list. Here is what it flags, how to turn it on, the edition nuance, and where it now reaches into your IDE and MCP client.
Your org has three thousand Apex classes and one of them is burning most of the CPU. You know this because a batch job times out every month-end, and every month-end someone spends a day in debug logs trying to find which trigger did it. The answer was knowable without the day. ApexGuru is Salesforce’s attempt to hand it to you.
ApexGuru is an AI-powered code analysis feature inside Scale Center that scans your Apex, finds the anti-patterns and expensive methods, and ranks them by how much they cost at runtime.
The right way to use it is as a priority queue: let it tell you the three things worth fixing this quarter, verify each one in its real context, and fix the expensive ones first. The wrong way is to treat every finding as a ticket.
What it looks for
ApexGuru combines static analysis of your code with your org’s runtime profile, so it flags code that is slow in your org at real data volume, rather than code that only looks slow on paper. It then ranks findings by expected impact, which is the part that matters.
The patterns it catches are the ones that show up in every performance review:
- SOQL or DML inside a loop, the single most common way a method that passes tests in a sandbox hits a governor limit in production once the record count grows.
- Inefficient query filters, including WHERE clauses that cannot use an index and force a full scan. Why a filter is or is not selective is its own discipline, and ApexGuru points you at the queries that are paying for getting it wrong.
- Methods that consume excessive CPU time, surfaced as critically expensive or expensive so you can see where the time goes rather than guessing.
- Unused classes and methods, the dead code that makes every deployment slower and every refactor scarier.
In 2026 the detection widened. The Summer ‘26 release added inline flagging and fixing of patterns like SOQL and DML in loops and redundant queries, plus Test Case Insights that surface inefficient tests dragging down your coverage runs. The Winter ‘27 update added duplicate and near-duplicate Apex detection, which finds the copy-pasted logic that should have been one method.
Confirm the exact feature set for your release in the live release notes, because ApexGuru ships new detectors most seasons.
Turning it on
ApexGuru lives under Scale Center, which is itself a free, self-serve performance monitoring tool. In Setup, search for Scale Center, open the ApexGuru tab under Scale Insights, and accept the ApexGuru agreement to enable it for the org. From there it scans on a schedule, typically weekly, and compares each run to the last so you can see whether a fix moved the number or a new regression crept in.
One honest caveat on availability. ApexGuru comes at no additional charge to Scale Center customers, but the edition and plan requirements read inconsistently across Salesforce’s own pages. Some list Unlimited Edition, Signature Success, and Scale Test, while the product FAQ reads more broadly.
Check what your specific org and plan include before you promise a team it is there, rather than trusting a blog, this one included, on the fine print.
The agreement step is not a formality worth skipping past. Enabling ApexGuru lets Salesforce analyze your Apex and runtime data, so route it through whoever owns data-processing approvals in your org the same way you would any analysis feature, and read what you are agreeing to.
Reading the list without drowning in it
The failure mode with any code scanner is the same: it returns four hundred findings, the team triages the first ten, and the tool becomes shelfware by the third sprint. ApexGuru’s ranking by runtime impact is the defense against that, and using it well is mostly about discipline.
Start at the top and stop early. A method flagged critically expensive that runs on every case save is worth a week. A theoretically inefficient query in a scheduled job that touches forty records once a night is worth nothing, no matter how red the flag.
Impact ranking exists precisely so you fix the first and ignore the second. The moment you start working findings in list order instead of impact order, you have lost the plot.
Verify every finding in context before you change code. A SOQL-in-a-loop flag on a method that only ever processes a single record is technically correct and practically harmless, and bulkifying it anyway adds a collection and a map for no benefit.
The tool is pattern-matching against your code and your runtime profile. It is not reading your intent, so you still own the judgment of whether the pattern is a problem here.
Treat the fix like any other change. A performance rewrite that turns a trigger red in production costs more than the slow query did, so the same guardrails apply: reproduce the cost, make the change behind your trigger framework, run the tests, and confirm the next ApexGuru run shows the number falling. One validated fix beats five speculative ones that each carry regression risk.
Where ApexGuru now meets your editor
For most of its life ApexGuru was a tab in Setup you remembered to visit. The 2026 story is that it moved to where developers already work.
ApexGuru is available through Code Analyzer in VS Code, so a performance finding can show up next to the lint and security findings in the editor rather than in a separate console you have to go check.
It reaches further through the Salesforce DX MCP Server, currently in beta, which exposes ApexGuru’s insights to MCP-compatible clients like Agentforce Vibes, Claude Code, Cursor, and Cline. The Salesforce developer blog on performance-first Apex walks through that integration.
The shift is worth understanding because it changes what the tool is for. In Setup, ApexGuru is an audit you run on code that already shipped.
Through the MCP server, an AI coding assistant can pull ApexGuru’s analysis while you are still writing the method, so the feedback lands before the anti-pattern is in production. The ceiling of the first is paying down debt you already have. The ceiling of the second is not writing it.
That potential comes with the same caution every AI-assisted workflow needs. A model reaching into your org through MCP is operating with real access, and a performance suggestion is still a suggestion to verify, not an instruction to apply blind. The detection is grounded in your runtime data, which makes it better than a generic linter. The judgment of whether and how to act stays yours.
Where it fits, and where it does not
ApexGuru is a performance and code-quality tool, so hold it to that scope. It is not a security scanner, and a method can be fast, lean, and still carry a SOQL injection or a missing CRUD check. For that you want the review the AppExchange security bar is built on, and the quick browser pass of our Apex Security Scanner is a complementary first look. ApexGuru tells you what is slow; it does not tell you what is unsafe.
It also does not replace knowing why the patterns are patterns. Understanding governor limits and the runtime cost of a non-selective query is what lets you read a finding and know in ten seconds whether it matters. ApexGuru is a faster way to find the hotspots in a large org, not a substitute for the engineering judgment that decides what to do about them. The slow query and the intermittent record lock are different problems, and only one of them shows up in this tool.
Used as a ranked worklist, verified in context, and wired into the editor where the code is written, ApexGuru earns its place: it turns the month-end day in the debug logs into a finding you could have read in a minute. Paying down the performance debt it surfaces, in priority order and without breaking production, is the kind of ongoing engineering we do inside a managed services engagement.
Understanding the basics
What is ApexGuru in Salesforce?
ApexGuru is an AI-powered code analysis feature inside Scale Center that scans your org’s Apex, combines static analysis with your runtime profile, and flags performance anti-patterns and expensive methods ranked by impact. It catches SOQL and DML inside loops, non-selective query filters, high-CPU methods, unused code, and, in newer releases, duplicate Apex. It became generally available in 2024 and ships new detectors most seasons.
How much does ApexGuru cost?
ApexGuru is described as available to Scale Center customers at no additional charge, and Scale Center itself is a free self-serve performance tool. The edition and plan requirements are stated inconsistently across Salesforce’s documentation, with some pages listing Unlimited Edition, Signature Success, and Scale Test, so confirm what your specific org includes before relying on access.
How do I enable ApexGuru?
In Setup, search for Scale Center, open the ApexGuru tab under Scale Insights, and accept the ApexGuru agreement to turn it on for the org. It then scans on a schedule, usually weekly, and compares each run to the previous one so you can track whether fixes are moving the numbers. Route the agreement through whoever owns data-processing approvals in your org.
Can ApexGuru work inside my IDE or an AI coding assistant?
Yes. ApexGuru is available through Code Analyzer in VS Code, and through the Salesforce DX MCP Server, in beta, which exposes its insights to MCP-compatible clients such as Agentforce Vibes, Claude Code, Cursor, and Cline. That lets a performance finding appear while you are still writing the method rather than only in a post-hoc audit, though every suggestion still needs verification before you apply it.
Sitting on a large org where nobody is sure which Apex is slow or safe to touch? Turning an ApexGuru backlog into a prioritized, validated paydown plan, without turning production red, is everyday work for our team. Talk to us.