Salesforce Governor Limit Optimizer
Optimizes Apex code to prevent System.LimitException by implementing SOQL, DML, heap, and CPU efficiency patterns.
The sf-governor-limits skill provides comprehensive guidance for developers working within the multi-tenant architecture of Salesforce. It offers standardized strategies for bulkifying Apex, reducing SOQL and DML statement counts through Collections and Maps, managing memory usage to avoid heap limits, and offloading heavy processing to asynchronous jobs. Whether you are troubleshooting a production System.LimitException or preparing code for an ISV security review, this skill ensures your Salesforce applications remain scalable, performant, and compliant with platform constraints.
主要功能
01Standardized bulkification patterns for SOQL and DML operations
02Strategies for CPU time optimization and heap size management
03Unit testing templates for validating governor limit compliance under load
04Defensive programming via real-time limit monitoring using the Limits class
05Asynchronous offloading decision trees for Batch, Future, and Queueable Apex
069 GitHub stars
使用场景
01Refactoring legacy Apex triggers that fail when processing large batches of records
02Converting synchronous processes to Queueable or Batch Apex to avoid CPU timeouts
03Optimizing SOQL queries within loops using the 'Query Once, Store in Map' pattern