Are there any good tools or techniques to profile Wicket applications? What I’m looking for is something that would give me a breakdown of what’s happening inside Wicket while processing a request.
It doesn’t have to be as fancy as Spring insight.
I’m new to Wicket and all the anonymous inner classes spread around everywhere makes it very hard to see when things are happening.
At least for Wicket 1.4 one can take a look at the internal method
org.apache.wicket.RequestCycle.steps(). Basically, this is the place where a request that has been identified as a request to the Wicket application is walked through the relevant steps of the Wicket request processing cycle. In the beginning of the classRequestCycle, the main steps are represented each by an int constant. The higher the int value, the later the step comes within the cycle. The methodRequestCycle.step()that gets called fromRequestCycle.steps()has a switch statement to delegate the different steps to the responsible framework methods which delegate further down.The steps, or phases if you like, in the request cycle are in order:
What is actually happening inside the steps is determined by the implementations of various interfaces, most notably
IRequestCycleProcessorandIRequestTarget.