-
1. Re: Simple navigation test takes 100 seconds !?
bgregory May 31, 2008 1:05 PM (in response to bgregory)Here's some more information:
2 pages that take normally ~2 seconds to navigate to: 1 has 6 columns, the other has 10 columns, they both have 10 rows. Each table has 2 contols in the header, and 4 in the footer, plus filter controls for each column, so roughly:
page 1: (6 x (10+1)) + 2 + 4 = 72
page 2: (10 x (10+1)) + 2 + 4 = 116
I ran the extact same navigation test (as listed before) on both pages:
page 1: 8.744 seconds
page 2: 33.307 seconds !!!
Both pages are using the exact same configuration of richfaces controls - to only reall difference is that one page has 6 columns and the other has 10
(BTW, I also simplified the header controls which dropped the time from 100 seconds to the 33 listed above) -
2. Re: Simple navigation test takes 100 seconds !?
ssilvert Jun 1, 2008 7:08 PM (in response to bgregory)Hi Brian,
Thanks for the valuable feedback.
I'm not surprised that the ClientIDs class is the slowest part of JSFUnit. However, I am surprised that a page with only 116 components takes so long. The RichFaces JSFDemo has tests with similar-sized datatables and each test takes less than a second.
Is there some way you could create a sample application that demonstrates the problem. Then you or I could profile it and see specifically where the bottleneck is. You can attach whatever you want to this jira issue that I created for this problem:
http://jira.jboss.com/jira/browse/JSFUNIT-96
If you've looked at the ClientIDs class, you saw that it will traverse the full component tree and gather the client ID for each component. So the problem could be in the time it takes to recursively navigate the tree. But I suspect that the problem could be that particular components take an excessive amount of time to calculate the client ID when we call UIComponent.getClientId().
There are lots of things we could do to speed up the ClientIDs class, but I don't want to try anything until we know exactly where the bottleneck is.
Stan -
3. Re: Simple navigation test takes 100 seconds !?
bgregory Jun 1, 2008 9:27 PM (in response to bgregory)So far I've found JSFUnit very useful, and plan on using it for regression testing, so I'm highly motivated to support the project any way I can.
I'll try to build a simple test project this week and post it (M-T?). -
4. Re: Simple navigation test takes 100 seconds !?
bgregory Jun 1, 2008 10:13 PM (in response to bgregory)BTW, What do you normally use to profile something running in JBoss?
I would the code could be instrumented to do this, but I was wondering if there are any good tools. -
5. Re: Simple navigation test takes 100 seconds !?
ssilvert Jun 2, 2008 8:32 AM (in response to bgregory)"bgregory" wrote:
BTW, What do you normally use to profile something running in JBoss?
I would the code could be instrumented to do this, but I was wondering if there are any good tools.
I've used OptimizeIt with good results in the past, but I haven't done JBoss AS profiling in a few years. Since I'm a NetBeans user, I'll probably try out the one that comes with NetBeans.
Stan -
6. Re: Simple navigation test takes 100 seconds !?
bgregory Jun 2, 2008 9:25 AM (in response to bgregory)I'm actually having trouble coming up with a stand-alone project that reproduces the problem. I have similarly complex pages that all run under 2 seconds. I'm going to try and nail down the slow parts and let you know.
I've used OptimizeIt a very long time ago, and I use eclipse now, perhaps I'll check out netbeans... -
7. Re: Simple navigation test takes 100 seconds !?
bgregory Jun 2, 2008 10:53 AM (in response to bgregory)Although I have not been able to reproduce the problem is code that I can submit, I have submitted a log file that shows a little more information.
-
8. Re: Simple navigation test takes 100 seconds !?
bgregory Jun 2, 2008 3:04 PM (in response to bgregory)Just posted an example project + more observation. Apparently the "trick" has to do with ExtendedDataModel + rich:dataTable + rich:datascroller.
-
9. Re: Simple navigation test takes 100 seconds !?
ssilvert Jun 2, 2008 8:18 PM (in response to bgregory)