function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Testing speed of Apex?

Is there a way of doing this? I've got a controller that has some features that are taking AGES to run now. Would be nice to see how / why it is getting hung up.

Got some stuff where buttons add/delete contacts to a record but for some reason they are taking ages to do so.
For context. The VF page has a couple of things it does that is running in the seconds to work. Having run a trace, I get this back:

Details for Timer Fire (77)
Description	A block of JavaScript was executed due to a JavaScript timer firing.
@	19674ms
Duration	5137.000ms
Timer Id	77
Timer Type	setTimeout
Interval	0ms

I have two chunks where this happens. One when pressing a button that performs a search (SOQL involved), and one which adds a search result to a record (no SOWL involved).

No idea why the times taken are so huge. The time is all soaked up in a JavaScript callback.