Hi, I think what Jim was also pointing out was Eager Loading which is really something to be taken very seriously. I remember we had a performance issue in one of our applications and after monitoring the generated SQL (we were using hibernate) we found a lot of eager loading in our grids.We resolved the issue by using a combination of Lazy Loading and even at times removing hibernate based table relationships and using business key of one table replace foreign key in other tables.
regards Taha On Tue, Dec 28, 2010 at 6:42 PM, Nicolas Barrera <nbarr...@gmail.com> wrote: > Jim, > > I think Duruk said that he's already managing pagination... so I think that > he's already using setMaxResults... > > unless he's using pagination only in the view side but not paginating the > query... (using maxresult). > > > Duruk, > > if you 're not using max result in your queries, you 're just paginating > the > data being displayed on the grid..., and querying the full table. > So let's say you have a database table with 1M rows, and you want to show > the user a grid with 10 rows per page. Then while you just show > 10 rows... a query to the database will query for 1M rows and bring them up > to memory in form of objects, that will always hit performance. > > If you paginate your queries too, you will ask for the 1M rows... but only > 10 at a time... so memory and db cpu will be fine. > > I leave a link I found useful for tapestry/hibernate pagination, perhaps > there 're better links around there this is just one: > > > http://www.sencha.com/forum/showthread.php?30595-extjs2-tapestry5.11-spring-hibernate%28grid-paging..-....%29 > > > hope it helps, > cheers. > > > Nicolás.- > > > On Tue, Dec 28, 2010 at 8:10 AM, Jim O'Callaghan <jc1000...@yahoo.co.uk > >wrote: > > > Also, if your grid is displaying many entities and those entities > contains > > many eager-loaded relations, you are retrieving a lot of data that may > not > > be necessary. Perhaps you should consider a view-only entity that is > > restricted to the actual displayed columns, and retrieve those entities > > with > > some manual SQL. Other options include setting the result set size > > (setMaxResults) and displaying an information message where the result > set > > is larger than the limit to prompt the user to be more specific in their > > search criteria, or using a grid where the pages of results are loaded on > > demand, rather than the entire list loaded upon initial display. > > > > Regards, > > Jim. > > > > -----Original Message----- > > From: Matheus Eduardo Machado Moreira [mailto:matheus....@gmail.com] > > Sent: 28 December 2010 10:50 > > To: Tapestry users > > Subject: Re: Grid with Scroll synchronization + Customization > > > > You could probably remove the TimingFilter that is present in your > > AppModule. This service is part of the app that is generated by the > > quickstart archetype and serve as an example of how to build and > contribute > > services. Just comment out the methods buildTimingFilter() and > > contributeRequestHandler() (if the timing filter is the only > contribution) > > and you have 2624 ms gain in you app. :-) > > > > Atenciosamente, > > > > Matheus Eduardo Machado Moreira > > matheus....@gmail.com > > > > *Good cooking takes time. If you are made to wait, it is to serve you > > better, and to please you.* > > Menu do Restaurant Antoine, New Orleans > > > > > > > > 2010/12/28 Duruk_Kab <durgesh.ka...@nuware.com> > > > > > > > > Thanks Thiago for pointing out logger issue. It was really very > helpful. > > > > > > Now, the application takes around 5-6 seconds instead of 12-13 seconds > it > > > was taking before. But still have to figure out why it is taking 5-6 > > > seconds > > > in Tapestry. > > > > > > The log says: > > > [2010-12-28 03:53:51.247] server-tomcat-thread-13 > > > System.out I **** ScrollableDataGrid - step 4 -:Tue Dec 28 03:53:51 EST > > > 2010 > > > [2010-12-28 03:53:51.257] server-tomcat-thread-13 > > > System.out I **** ScrollableDataGrid - step 3 -:Tue Dec 28 03:53:51 EST > > > 2010 > > > [2010-12-28 03:53:51.257] server-tomcat-thread-13 > > > System.out I **** ScrollableDataGrid - step 4 -:Tue Dec 28 03:53:51 EST > > > 2010 > > > [2010-12-28 03:53:51.377] server-tomcat-thread-13 > > > .cfs.raa.web.services.AppModule.TimingFilter.unknown I Request time: > 2624 > > > ms > > > [2010-12-28 03:53:57.436] server-tomcat-thread-14 > > > .cfs.raa.web.services.AppModule.TimingFilter.unknown I Request time: 0 > ms > > > [2010-12-28 03:53:57.456] server-tomcat-thread-13 > > > .cfs.raa.web.services.AppModule.TimingFilter.unknown I Request time: 0 > ms > > > [2010-12-28 03:54:02.894] server-tomcat-thread-13 > > > .cfs.raa.web.services.AppModule.TimingFilter.unknown I Request time: 0 > ms > > > > > > > > > It says TimingFilter took 2624ms. Any idea??? > > > > > > I have below method in my AppModule which uses TiminigFilter: > > > public void > contributeRequestHandler(OrderedConfiguration<RequestFilter> > > > configuration, @InjectService("TimingFilter") RequestFilter filter) { > > > > > > // Each contribution to an ordered configuration has a name, When > > > necessary, > > > you may > > > // set constraints to precisely control the invocation order of the > > > contributed filter > > > // within the pipeline. > > > > > > configuration.add("Timing", filter); > > > } > > > > > > Please help me to find out the root cause so that I can resolve this > > > performance issue. > > > > > > @ DK > > > -- > > > View this message in context: > > > > > > > > http://tapestry-users.832.n2.nabble.com/Grid-with-Scroll-synchronization-Cus > > tomization-tp5863225p5871361.html< > http://tapestry-users.832.n2.nabble.com/Grid-with-Scroll-synchronization-Cus%0Atomization-tp5863225p5871361.html > > > > > Sent from the Tapestry Users mailing list archive at Nabble.com. > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > >