Exam PDII Topic 4 Question 157 Discussion
Actual exam question for Salesforce's PDII exam
Question #: 157
Topic #: 4
Question #: 157
Topic #: 4
The use of the transient keyword in Visualforce page helps with which performance issue?
Suggested Answer: A Vote an answer
In Visualforce, the "View State" is a hidden form field that maintains the state of the page (and the controller's variables) across postbacks to the server. If the View State becomes too large, it can slow down page loads and eventually hit the Salesforce View State limit (170KB), causing the page to crash.
The transient keyword is used to declare instance variables in Apex controllers that should not be saved in the View State. When a variable is marked as transient, its value is discarded after the request finishes and is not transmitted back to the client. This effectively reduces the size of the View State. It is commonly used for data that is needed only for the duration of the current request (like a large list of records displayed in a read-only table) and can be easily requeried or recalculated if needed.
The transient keyword is used to declare instance variables in Apex controllers that should not be saved in the View State. When a variable is marked as transient, its value is discarded after the request finishes and is not transmitted back to the client. This effectively reduces the size of the View State. It is commonly used for data that is needed only for the duration of the current request (like a large list of records displayed in a read-only table) and can be easily requeried or recalculated if needed.
by Sabrina at Jun 04, 2026, 02:08 PM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).