You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Charles Godfrey <ch...@gmail.com> on 2011/10/19 15:17:38 UTC
Struts2 Memory Management
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
Re: Struts2 Memory Management
Posted by Dave Newton <da...@gmail.com>.
On Wed, Oct 19, 2011 at 12:12 PM, Charles Godfrey wrote:
> Customers who use the product can have
> 100 rows or 10,000 rows in a table, and several have into the 1000's.
>
On the *client* side?! I can't see how that's useful.
Dave
Re: Struts2 Memory Management
Posted by Charles Godfrey <ch...@gmail.com>.
Thanks for all the great feedback guys.
Right now its a custom framework (similar to Struts) but uses straight JDBC
and no JSP, ie. presentation is done in Java classes using only
out.println(). It performs very well. Customers who use the product can have
100 rows or 10,000 rows in a table, and several have into the 1000's.
The lazy load comment earlier is a good one that I wished I thought of on
the spot. It will solve the issue of large number of rows. I'l revisit that
with the team.
The impetus for this was me trying to move into an MVC design (i.e. no more
out.println() in the action classes) and chose Struts as the framework since
what we have closely resembles it and several devs including myself have
used it successfully in the past.
Thanks a lot guys,
-Charles
On Wed, Oct 19, 2011 at 11:50 AM, Eric Lentz <Er...@sherwin.com> wrote:
> > any current framework can easily handle such a request
>
> I agree. Maybe it would be helpful for the OP to let us in on what other
> framework is being considered by way of comparison so the OP can tap into
> the wealth of knowledge on this forum for real arguments to take back to
> the opposition. Also, is this 1000 objects a real use case or a
> red-herring that someone in a meeting threw out because they had some kind
> of bend away from Struts (OP's statement: "assume the above is a
> requirement for now")? I'd suggest focusing on real use cases if this 1000
> example isn't one.
>
> Like Eric points out, depending on the size of the objects, 1000 isn't
> really that much anyway. How are records being read from the DB? For
> example, using Hibernate? If so, you may want to check on your
> PersistenceContext and see how many objects are being stored there (and
> GC'd and possibly dirty checked when the session closes).
Re: Struts2 Memory Management
Posted by Eric Lentz <Er...@sherwin.com>.
> any current framework can easily handle such a request
I agree. Maybe it would be helpful for the OP to let us in on what other
framework is being considered by way of comparison so the OP can tap into
the wealth of knowledge on this forum for real arguments to take back to
the opposition. Also, is this 1000 objects a real use case or a
red-herring that someone in a meeting threw out because they had some kind
of bend away from Struts (OP's statement: "assume the above is a
requirement for now")? I'd suggest focusing on real use cases if this 1000
example isn't one.
Like Eric points out, depending on the size of the objects, 1000 isn't
really that much anyway. How are records being read from the DB? For
example, using Hibernate? If so, you may want to check on your
PersistenceContext and see how many objects are being stored there (and
GC'd and possibly dirty checked when the session closes).
Re: Struts2 Memory Management
Posted by Dave Newton <da...@gmail.com>.
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 <ER...@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 <ch...@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 <da...@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" <ch...@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-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Struts2 Memory Management
Posted by Eric Reed <ER...@MAIL.NYSED.GOV>.
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 <ch...@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 <da...@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" <ch...@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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2 Memory Management
Posted by Robert Graf-Waczenski <rg...@lsoft.com>.
Am 19.10.2011 15:49, schrieb Charles Godfrey:
> 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.
Nothing in Struts2 forces you to load all objects "into the action
class". You are, however, in most cases, forced to give your action
class methods that return iterator-like classes (to benefit from the s2
tags in your JSP). But even those can be programmed without loading
everything into memory. Internal pointers to (for example) JDBC result
sets come in handy in such situations, just use some magic in your
implementation of the iterator interface methods and you should be fine
even with small amounts of memory.
You are not having a Struts2 issue, you are having a design issue that
is independent of the framework you choose.
Or, more bluntly and the other way around: Stupid design causes trouble
in any framework.
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Struts2 Memory Management
Posted by ka...@wipro.com.
In this case page will take more time load for low bandwidth so some
other way is there to tune the memory management in struts 2
So please go through struts 2 documentation
-----Original Message-----
From: Mario Urquilla [mailto:mario.urquilla@aviancataca.com]
Sent: Wednesday, October 19, 2011 7:09 AM
To: Struts Users Mailing List
Subject: Re: Struts2 Memory Management
-----Original Message-----
From: Dave Newton <da...@gmail.com>
Date: Wed, 19 Oct 2011 09:58:31
To: Struts Users Mailing List<us...@struts.apache.org>
Reply-To: Struts Users Mailing List <us...@struts.apache.org>
Subject: Re: Struts2 Memory Management
You'll find *everything* is a no-go if that's their concern.
On Wed, Oct 19, 2011 at 9:49 AM, Charles Godfrey <ch...@gmail.com>
wrote:
> 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 <da...@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" <ch...@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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2 Memory Management
Posted by Muneer Malik <tu...@gmail.com>.
I believe the tuning would occur on your app container and not in Struts 2.
Best,
Muneer Malik
On Oct 19, 2011, at 9:28 AM, <ka...@wipro.com> wrote:
> Can we do any application lever tuning in struts 2?
>
>
> -----Original Message-----
> From: Robert Graf-Waczenski [mailto:rgw@lsoft.com]
> Sent: Wednesday, October 19, 2011 7:25 AM
> To: Struts Users Mailing List
> Subject: Re: Struts2 Memory Management
>
> Am 19.10.2011 16:16, schrieb dan.zheng:
>> So many objects dump directly to jsp will certainly consume a lot
> memory,I
>> suppose you can enlarge your Web Server's jvm memory size to afford
> your
>> requirement
>> such as "-Xms 1024m -Xmx 1024m",more details can come from google "jvm
>> tuning"
>
> What do you mean by "dump directly to jsp"? Struts2 custom tags are
> ultimately calling your action class methods to (for example) access an
> action property in the form of an instance of an iterator-like class.
> Exactly *how* the data is maintained internally is completely left to
> the implementation of *your* class, the framework itself uses proper
> abstraction. In short: Memory issues are *your fault* not Struts2's.
>
> Robert
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>
> www.wipro.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Struts2 Memory Management
Posted by ka...@wipro.com.
Can we do any application lever tuning in struts 2?
-----Original Message-----
From: Robert Graf-Waczenski [mailto:rgw@lsoft.com]
Sent: Wednesday, October 19, 2011 7:25 AM
To: Struts Users Mailing List
Subject: Re: Struts2 Memory Management
Am 19.10.2011 16:16, schrieb dan.zheng:
> So many objects dump directly to jsp will certainly consume a lot
memory,I
> suppose you can enlarge your Web Server's jvm memory size to afford
your
> requirement
> such as "-Xms 1024m -Xmx 1024m",more details can come from google "jvm
> tuning"
What do you mean by "dump directly to jsp"? Struts2 custom tags are
ultimately calling your action class methods to (for example) access an
action property in the form of an instance of an iterator-like class.
Exactly *how* the data is maintained internally is completely left to
the implementation of *your* class, the framework itself uses proper
abstraction. In short: Memory issues are *your fault* not Struts2's.
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2 Memory Management
Posted by Robert Graf-Waczenski <rg...@lsoft.com>.
Am 19.10.2011 16:16, schrieb dan.zheng:
> So many objects dump directly to jsp will certainly consume a lot memory,I
> suppose you can enlarge your Web Server's jvm memory size to afford your
> requirement
> such as "-Xms 1024m -Xmx 1024m",more details can come from google "jvm
> tuning"
What do you mean by "dump directly to jsp"? Struts2 custom tags are
ultimately calling your action class methods to (for example) access an
action property in the form of an instance of an iterator-like class.
Exactly *how* the data is maintained internally is completely left to
the implementation of *your* class, the framework itself uses proper
abstraction. In short: Memory issues are *your fault* not Struts2's.
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2 Memory Management
Posted by "dan.zheng" <cm...@gmail.com>.
So many objects dump directly to jsp will certainly consume a lot memory,I
suppose you can enlarge your Web Server's jvm memory size to afford your
requirement
such as "-Xms 1024m -Xmx 1024m",more details can come from google "jvm
tuning"
On Wed, Oct 19, 2011 at 10:08 PM, Mario Urquilla <
mario.urquilla@aviancataca.com> wrote:
>
>
> -----Original Message-----
> From: Dave Newton <da...@gmail.com>
> Date: Wed, 19 Oct 2011 09:58:31
> To: Struts Users Mailing List<us...@struts.apache.org>
> Reply-To: Struts Users Mailing List <us...@struts.apache.org>
> Subject: Re: Struts2 Memory Management
>
> You'll find *everything* is a no-go if that's their concern.
>
> On Wed, Oct 19, 2011 at 9:49 AM, Charles Godfrey <ch...@gmail.com> wrote:
>
> > 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 <da...@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" <ch...@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-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Struts2 Memory Management
Posted by Mario Urquilla <ma...@aviancataca.com>.
-----Original Message-----
From: Dave Newton <da...@gmail.com>
Date: Wed, 19 Oct 2011 09:58:31
To: Struts Users Mailing List<us...@struts.apache.org>
Reply-To: Struts Users Mailing List <us...@struts.apache.org>
Subject: Re: Struts2 Memory Management
You'll find *everything* is a no-go if that's their concern.
On Wed, Oct 19, 2011 at 9:49 AM, Charles Godfrey <ch...@gmail.com> wrote:
> 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 <da...@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" <ch...@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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2 Memory Management
Posted by Dave Newton <da...@gmail.com>.
You'll find *everything* is a no-go if that's their concern.
On Wed, Oct 19, 2011 at 9:49 AM, Charles Godfrey <ch...@gmail.com> wrote:
> 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 <da...@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" <ch...@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
> > >
> >
>
Re: Struts2 Memory Management
Posted by Charles Godfrey <ch...@gmail.com>.
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 <da...@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" <ch...@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
> >
>
Re: Struts2 Memory Management
Posted by Dave Newton <da...@gmail.com>.
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" <ch...@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
>
Re: Struts2 Memory Management
Posted by Chris Mawata <ch...@mathcove.net>.
If your requirement is to have a gallon of water in a jug, there is no
way to manufacture a jug that will make that gallon into half a gallon.
On 10/19/2011 9:17 AM, Charles Godfrey 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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org