• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: java.lang.OutOfMemoryError with WODisplayGroup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java.lang.OutOfMemoryError with WODisplayGroup


  • Subject: Re: java.lang.OutOfMemoryError with WODisplayGroup
  • From: Art Isbell <email@hidden>
  • Date: Wed, 8 Oct 2003 15:10:52 -1000

On Wednesday, October 8, 2003, at 01:25  PM, Denis Stanton wrote:

I have naively assumed that a WODisplayGroup set to display records in batches would only need to hold the current batch in memory, so the total table size would not be an issue. Is this overly simplistic?

Yes. It fetches the entire batch of objects from the database server to the application server but sends only 1 batch per page to the Web browser so you don't flood the user's machine with thousands of fetched objects. If you issued an SQL "select" statement, you'd get all the records selected. There's no batching capability in SQL as far as I know, so EOF behaves like SQL in this respect.


I was reluctant to believe that WebObjects simply can't handle a 6,063 line table. (Mac OS X 10.2.6, WebObjects 5.2.1, iMac G3 400, 512MB)

EOF can handle as much data as the Java Virtual Machine can handle. So there is no inherent limit within EOF.


Is it really the case that a WODisplayGroup runs out of memory handling a table of between 3 and 6 thousand records?

Nope, the JVM does.

Does the presence or absence of indexes, or the selection of a sort sequence in the WODisplayGroup make a difference? It does not seem to , but it occurred to me that the memory problem might crop up in sorting.

Indexes on the DB could certainly accelerate a qualified fetch, but the amount of memory used on the application server wouldn't be affected.


But where sorting occurs could affect the amount of application server memory used. It's usually preferable from both a performance and memory perspective to have the database do the sorting rather than doing it on the application server unless the objects have already been fetched. I don't fetch with display groups, but I believe a sort order set on a display group always sorts on the application server. To sort on the database server, you'd need to apply a sort ordering to a fetch specification applied to the display group's data source. Someone please correct me if I'm wrong on this.

I guess the bottom line is that a Web application is generally used by humans. Humans don't process thousands of objects very well. So it's usually best to somehow limit the number of objects fetched rather than to try to deal with a huge number of objects. Maybe there's some sort of qualifier you can use to limit the number of objects fetched. That would seem to be the preferable solution rather than increasing the JVM memory limit.

Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: java.lang.OutOfMemoryError with WODisplayGroup
      • From: Denis Stanton <email@hidden>
References: 
 >java.lang.OutOfMemoryError with WODisplayGroup (From: Denis Stanton <email@hidden>)

  • Prev by Date: Re: java.lang.OutOfMemoryError with WODisplayGroup
  • Next by Date: Re: webobjects-dev digest, Vol 1 #483 - 13 msgs
  • Previous by thread: Re: java.lang.OutOfMemoryError with WODisplayGroup
  • Next by thread: Re: java.lang.OutOfMemoryError with WODisplayGroup
  • Index(es):
    • Date
    • Thread