What is a recommended practice with regard to the Apex CPU limit? - ProProfs Discuss
Topics
Products
Follow Us:

What is a recommended practice with regard to the Apex CPU limit?



A. Optimize SOQL query performance.
B. Use Map collections to cache sObjects.
C. Avoid nested Apex iterations.
D. Reduce view state in Visualforce pages.

This question is part of PD2
Asked by Pal, Last updated: Mar 26, 2020

+ Answer
Request

3 Answers

G. Roland

G. Roland, Professor, Austin

Answered Sep 10, 2018

You do not want to experience the APEX CPU time limit exceeded message. There are different considerations that you should do. First is letter B. You can use maps for cache so that you can work faster and you can find what you are looking for in a short amount of time. Another answer is C.

You need to avoid repeating the process again and again. If you would do these two options, it is likely that you do not need to be alerted if you have exceeded the time because you will finish before time is up. Time is always important not only in programming but also in other aspects of life.

 

devilzP

DevilzP

Answered Apr 05, 2018

Maps for cache
Avoid nested Apex iterations.

SOQL query will never give CPU timeout

 

Pal

Pal

Answered Nov 13, 2017

Optimize SOQL query performance.
Avoid nested Apex iterations.
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.