[jira] Commented: (WICKET-1671) Performance problem with detach (Component.isAuto)
[ https://issues.apache.org/jira/browse/WICKET-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658823#action_12658823 ] Juergen Donnerstag commented on WICKET-1671: I did some tests against 1.4 trunk. I basically used your source code and created a test case public class PerformanceTest extends WicketTestCase { public void testRenderHomePage() throws Exception { for (int i = 0; i < 10; i++) { tester.startPage(PerformanceTestPage.class); tester.assertRenderedPage(PerformanceTestPage.class); if ((i % 100) == 0) { System.out.println(i); } } System.out.println("fertig"); } } Executing that test case and monitoring it with the Yourkit profiler the result is that isAuto() is invoked 2160 times and execution took 157ms. Out of these 2160 isAuto was called 1060 times by detach. I've not yet tested it against 1.3 but based on my numbers, any improvement would only be limited. > Performance problem with detach (Component.isAuto) > -- > > Key: WICKET-1671 > URL: https://issues.apache.org/jira/browse/WICKET-1671 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.3.3 > Environment: Tomcat 5.5.23 > Windows XP/JDK 1.6.0_03 > Windows 2003/JDK 1.5 >Reporter: Heikki Uotinen >Assignee: Johan Compagner > Attachments: detach.zip > > > We have an application that uses AjaxSelfUpdatingTimerBehavior to update a > panel that has several child components. > Application has a performance problem and profiler shows that the most time > is consumed in Component.isAuto method. > It seems that isAuto flag is checked up and down the component tree. > There is attached a simple demonstration about the problem and screenshots of > the profiler displays. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1671) Performance problem with detach (Component.isAuto)
[ https://issues.apache.org/jira/browse/WICKET-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604434#action_12604434 ] Ari Suutari commented on WICKET-1671: - Would it be possible for Component.add to propaganate FLAG_AUTO to children if the parent already has it ? This way Component.isAuto wouldn't have to check the component tree upwards every time, which would fix this. Now, isAuto traverses the component tree up every time it is called (and it is called in detach a lot, since it traverses component tree from up to down) and for most of time components don't have FLAG_AUTO so this just wastes a lot of time. This issue is very visible on pages which have a lot of images, for example, since one page render results in browser requesting those images - a lot of requests, a lot of detach calls and a lot of isAuto calls - page renders very slowly. > Performance problem with detach (Component.isAuto) > -- > > Key: WICKET-1671 > URL: https://issues.apache.org/jira/browse/WICKET-1671 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.3.3 > Environment: Tomcat 5.5.23 > Windows XP/JDK 1.6.0_03 > Windows 2003/JDK 1.5 >Reporter: Heikki Uotinen >Assignee: Johan Compagner > Attachments: detach.zip > > > We have an application that uses AjaxSelfUpdatingTimerBehavior to update a > panel that has several child components. > Application has a performance problem and profiler shows that the most time > is consumed in Component.isAuto method. > It seems that isAuto flag is checked up and down the component tree. > There is attached a simple demonstration about the problem and screenshots of > the profiler displays. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.