Exam APD01 All QuestionsBrowse all questions from this exam
Question 27

Using a Wait stage to check if a Java element exists requires the Java Application Model tree to be traversed. Constantly accessing the model can be costly in terms of CPU efficiency.

Which of the following tips is a valid method to help manage this CPU efficiency cost?

    Correct Answer: A

    Avoid using long timeout periods in Wait Stages that wait for Java elements because constantly accessing the Java Application Model tree can be CPU intensive. Reducing the duration of timeout periods reduces the frequency of these costly operations, thereby helping manage CPU efficiency costs.

Discussion
mndfsnzOption: A

A is the correct. 3 Interconnection with Java applications 3.1 Waiting stages Using a standby stage to see if a Java element exists means that you go through the Java Application Model tree. Constantly accessing the model can be costly in terms of CPU efficiency, so it is recommended that you follow the tips below: - Avoid using waiting stages that constantly verify the existence of a Java element. A 10-second waiting stage could spoil the application model considerably. An alternative could be to use a waiting stage with a fixed period before the waiting stage that checks if the element exists. By doing this, enough time should have passed to allow the element to appear, meaning that the first check of the application model would be sufficient. - Avoid using wait stages that check several conditions at the same time. For example, it does not make much sense to check an element that rarely occurs, especially if doing so would result in potentially costly CPU instructions. It would be better to wait for fewer conditions, leveled according to the possibility of their occurrence. You can always go back to this waiting stage if the waiting time is over.