Salesforce Certified Platform Developer II — Question 85
What is a recommended practice with regard to the Apex CPU limit? (Choose two.)
Answer options
- A. Optimize SOQL query performance
- B. Use Map collections to cache sObjects
- C. Avoid nested Apex iterations
- D. Reduce view state in Visualforce pages
Correct answer: B, C
Explanation
Using Map collections to cache sObjects (B) helps reduce CPU time by avoiding repeated queries for the same data. Avoiding nested Apex iterations (C) is important as it can lead to increased CPU time due to the complexity of processing multiple levels of loops. Options A and D, while useful optimizations, do not directly relate to managing the Apex CPU limit as effectively as B and C do.