Whether or not the browser crashes depends on how the 1k objects are rendered; most browsers can handle a 1k-row table, although it may chunk a bit during the render. Older browsers will do worse.
In this case, however, that doesn't seem to be an issue, since the app was already doing it--the concern was with the data fetch, not the client push. The solution is pretty simple; use a lazy list that knows when it needs to fetch more data, allowing the use of standard JSTL or S2 tags, and avoiding generation of HTML in a servlet. (Of course, you could do that in S2 as well.) Dave On Wed, Oct 19, 2011 at 11:28 AM, Eric Reed <ere...@mail.nysed.gov> wrote: > Struts 2 would perform about the same as all the other frameworks > available. > > Storing an array list of 1000 objects on your server won't consume all that > much memory and any current framework can easily handle such a request. > This also depends on the size of the object, and how much memory is > allocated to the application. The real slow-down would come from the garbage > collector if your process was called so much that it was eating up all your > available memory. Read up on all the ways you can configure the collector > and you will find that it can easily clean up the mess without bringing your > application to a halt. > > The real problem however is on the client end, the browser will most likely > crash. > > Eric Reed > NYS Education Department > Senior Developer > TEACH System > > > > >>> Charles Godfrey <cha...@gmail.com> 10/19/2011 9:49 AM >>> > Sorry, let me clarify. > > I meant loading all those objects into the action class vs. lets say > loading > 50 at a time and doing out.println() in your servlet, then repeating this, > so you are only ever loading 50 (or whatever number) into memory. > > I know you can always throw more memory at it, or paginate long lists of > data so you don't have to load all at once, but the question I'm being > asked > is how does Struts2 perform if I do need to present a large amount of data > to the user? > > I had the same reaction you did, but is there any memory/session/advanced > feature, anything at all, that even relates to this? > Until I can show this won't be an issue, Struts2 is a no go, so I'm > reaching > out to you all. > > -Charles > > > > On Wed, Oct 19, 2011 at 9:21 AM, Dave Newton <davelnew...@gmail.com> > wrote: > > > I don't understand; what does this have to do with Struts 2 *or* MVC? You > > load a thousand objects into memory, you load a thousand objects into > > memory--that's pretty much framework, design pattern, and > language-neutral. > > > > Dave > > On Oct 19, 2011 9:18 AM, "Charles Godfrey" <cha...@gmail.com> wrote: > > > > > Hello everyone, > > > > > > Not sure if this is the right forum for this question. > > > > > > I made a presentation to my dev team to use Struts2 and the issue of > > "uses > > > too much memory" came up. If I need to retrieve 1000 rows from a > database > > > and have a JSP present those to the user, how does one handle having > that > > > many objects in memory. (Yes I know this many rows should be paginated, > > > etc, > > > but assume the above is a requirement for now). Is there anything in > > > Struts2 > > > that addresses large amounts of data that need to be kept around until > > the > > > JSP is done presenting it? Is this more an "MVC" issue instead? > > > > > > Thanks, > > > -Charles > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >