Skip to main content
All CollectionsRule documentationCoding best practices
Inefficient calls to Schema.getGlobalDescribe
Inefficient calls to Schema.getGlobalDescribe

Detect calls to Schema.getGlobalDescribe that are inefficient and could be optimized, in order to reduce resource consumption and latency.

Gabriele Gallo Stampino avatar
Written by Gabriele Gallo Stampino
Updated this week

Rationale

In Salesforce Apex, Schema.getGlobalDescribe is a method that allows developers to dynamically fetch metadata information about all objects in the Salesforce schema. While this offers flexibility, it can be resource-intensive, especially in orgs with numerous custom objects and fields. It consumes CPU time and memory and contributes to governor limits like CPU time limits.

Scope

  • Apex

Resources

Did this answer your question?