What is a recommended practice with regard to the Apex CPU limit? - ProProfs Discuss
Cancel
TopicsDown
Products Down
Follow Us:
FacebookTwitter
Advertisement

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: Sep 19, 2020

+ Answer
Request
Question menu
Vote up Vote down

3 Answers

G. Roland

G. Roland

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.

upvote downvote
Reply 

devilzP

devilzP

devilzP
DevilzP

Answered Apr 05, 2018

Maps for cache
Avoid nested Apex iterations.

SOQL query will never give CPU timeout

upvote downvote
Reply 

Pal

Pal

Pal
Pal

Answered Nov 13, 2017

Optimize SOQL query performance.
Avoid nested Apex iterations.
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

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