Github user PhantomYdn commented on the pull request:
https://github.com/apache/wicket/pull/164#issuecomment-217679092
I prepared some PoC. Please find it here:
https://github.com/PhantomYdn/wicket-bugs/tree/master/javassistpoc
Class
https://github.com/PhantomYdn/wicket-bugs/blob/master/javassistpoc/src/main/java/ru/ydn/wicket/javassist/JAClassResolver.java
does all the logic. And btw >50% of it is a copy paste of DefaultClassResolver
(unfortunately needed methods marked final).
1) Run PoC by `mvn clean jetty:run`
2) Open http://localhost:8080 in a browser
3) Checkout system out
4) You will see something like this but much longer;)
```
ru.ydn.wicket.javassist.HomePage.renderPage() call took 35766587ns
ru.ydn.wicket.javassist.HomePage.isBookmarkable() call took 15989ns
ru.ydn.wicket.javassist.HomePage.getPageParameters() call took 7471ns
ru.ydn.wicket.javassist.HomePage.getPageParameters() call took 4880ns
ru.ydn.wicket.javassist.HomePage.onDetach() call took 23818ns
ru.ydn.wicket.javassist.HomePage.detachModel() call took 4562ns
ru.ydn.wicket.javassist.HomePage.detachModels() call took 48334ns
ru.ydn.wicket.javassist.HomePage.iterator() call took 5477ns
ru.ydn.wicket.javassist.HomePage.isBookmarkable() call took 8722ns
```
Space indentation is for highligting internal calls
Of course, it possible to instrument just selected methods for a profiler.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---