You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Foo Shyn Chung <ip...@gmail.com> on 2011/10/06 09:48:14 UTC

Multi page listing mechanism

Hi guys,

Would like to ask what is the mechanism used in Ofbiz for multi page
listing?

Currently we have a live site whereby the listing would resulted in a few
thousands rows being returned and displayed on multiple page on the screen.
We found that once the data amount hit a certain amount, the performance of
that page will become very slow.

For listing, is Ofbiz will load up all the results in the memory, then only
segregate them into multiple page? or they only will load the data when the
user is viewing the page (i.e. when the user click next page, then the data
for the next page is loaded).

Not sure whether anyone has encountered this before?

Thank you
FooShyn

Re: Multi page listing mechanism

Posted by Anne <an...@cohsoft.com.au>.
Also check whether you are sorting by a field that makes postgres load
all the data and sort it in memory before it can page anything.

Cheers,
Anne.

On 25 October 2011 05:01, BJ Freeman <bj...@free-man.net> wrote:
> You have two issues, the caching in Postgres which is memory based and
> ofbiz caching of the recordset that is returned.
> I suggest you look at the number of instances of Postgres for the
> instance of ofbiz and the total memory available on the bos you are
> running on.
> also look at the indexing of the data you are searching on.
>
> Foo Shyn Chung sent the following on 10/24/2011 3:39 AM:
>> I'm using Postgres as the database, i think it should support cursor fine.
>> Anyway the reason i'm asking this is that the client is facing load time
>> issue when they try to search out large amount of data. Although the result
>> is segregated by paging, it seems like it is still affecting the memory
>> usage. Hence i'm trying to figure out what's the problem.
>>
>> A lot of thanks for any comments or advice.
>>
>> Thank you
>> FooShyn
>>
>> On Wed, Oct 12, 2011 at 12:18 AM, BJ Freeman <bj...@free-man.net> wrote:
>>
>>> are you using an entity OTTB?
>>> Some DB will not handle Cursors.
>>>
>>> Foo Shyn Chung sent the following on 10/6/2011 12:48 AM:
>>>> Hi guys,
>>>>
>>>> Would like to ask what is the mechanism used in Ofbiz for multi page
>>>> listing?
>>>>
>>>> Currently we have a live site whereby the listing would resulted in a few
>>>> thousands rows being returned and displayed on multiple page on the
>>> screen.
>>>> We found that once the data amount hit a certain amount, the performance
>>> of
>>>> that page will become very slow.
>>>>
>>>> For listing, is Ofbiz will load up all the results in the memory, then
>>> only
>>>> segregate them into multiple page? or they only will load the data when
>>> the
>>>> user is viewing the page (i.e. when the user click next page, then the
>>> data
>>>> for the next page is loaded).
>>>>
>>>> Not sure whether anyone has encountered this before?
>>>>
>>>> Thank you
>>>> FooShyn
>>>>
>>>
>>
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Phone: (03) 9585 6788
Fax: (03) 9585 1086
Web: http://www.cohsoft.com.au/
Email: sales@cohsoft.com.au

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/

Re: Multi page listing mechanism

Posted by BJ Freeman <bj...@free-man.net>.
You have two issues, the caching in Postgres which is memory based and
ofbiz caching of the recordset that is returned.
I suggest you look at the number of instances of Postgres for the
instance of ofbiz and the total memory available on the bos you are
running on.
also look at the indexing of the data you are searching on.

Foo Shyn Chung sent the following on 10/24/2011 3:39 AM:
> I'm using Postgres as the database, i think it should support cursor fine.
> Anyway the reason i'm asking this is that the client is facing load time
> issue when they try to search out large amount of data. Although the result
> is segregated by paging, it seems like it is still affecting the memory
> usage. Hence i'm trying to figure out what's the problem.
> 
> A lot of thanks for any comments or advice.
> 
> Thank you
> FooShyn
> 
> On Wed, Oct 12, 2011 at 12:18 AM, BJ Freeman <bj...@free-man.net> wrote:
> 
>> are you using an entity OTTB?
>> Some DB will not handle Cursors.
>>
>> Foo Shyn Chung sent the following on 10/6/2011 12:48 AM:
>>> Hi guys,
>>>
>>> Would like to ask what is the mechanism used in Ofbiz for multi page
>>> listing?
>>>
>>> Currently we have a live site whereby the listing would resulted in a few
>>> thousands rows being returned and displayed on multiple page on the
>> screen.
>>> We found that once the data amount hit a certain amount, the performance
>> of
>>> that page will become very slow.
>>>
>>> For listing, is Ofbiz will load up all the results in the memory, then
>> only
>>> segregate them into multiple page? or they only will load the data when
>> the
>>> user is viewing the page (i.e. when the user click next page, then the
>> data
>>> for the next page is loaded).
>>>
>>> Not sure whether anyone has encountered this before?
>>>
>>> Thank you
>>> FooShyn
>>>
>>
> 

Re: Multi page listing mechanism

Posted by Foo Shyn Chung <ip...@gmail.com>.
I'm using Postgres as the database, i think it should support cursor fine.
Anyway the reason i'm asking this is that the client is facing load time
issue when they try to search out large amount of data. Although the result
is segregated by paging, it seems like it is still affecting the memory
usage. Hence i'm trying to figure out what's the problem.

A lot of thanks for any comments or advice.

Thank you
FooShyn

On Wed, Oct 12, 2011 at 12:18 AM, BJ Freeman <bj...@free-man.net> wrote:

> are you using an entity OTTB?
> Some DB will not handle Cursors.
>
> Foo Shyn Chung sent the following on 10/6/2011 12:48 AM:
> > Hi guys,
> >
> > Would like to ask what is the mechanism used in Ofbiz for multi page
> > listing?
> >
> > Currently we have a live site whereby the listing would resulted in a few
> > thousands rows being returned and displayed on multiple page on the
> screen.
> > We found that once the data amount hit a certain amount, the performance
> of
> > that page will become very slow.
> >
> > For listing, is Ofbiz will load up all the results in the memory, then
> only
> > segregate them into multiple page? or they only will load the data when
> the
> > user is viewing the page (i.e. when the user click next page, then the
> data
> > for the next page is loaded).
> >
> > Not sure whether anyone has encountered this before?
> >
> > Thank you
> > FooShyn
> >
>

Re: Multi page listing mechanism

Posted by BJ Freeman <bj...@free-man.net>.
are you using an entity OTTB?
Some DB will not handle Cursors.

Foo Shyn Chung sent the following on 10/6/2011 12:48 AM:
> Hi guys,
> 
> Would like to ask what is the mechanism used in Ofbiz for multi page
> listing?
> 
> Currently we have a live site whereby the listing would resulted in a few
> thousands rows being returned and displayed on multiple page on the screen.
> We found that once the data amount hit a certain amount, the performance of
> that page will become very slow.
> 
> For listing, is Ofbiz will load up all the results in the memory, then only
> segregate them into multiple page? or they only will load the data when the
> user is viewing the page (i.e. when the user click next page, then the data
> for the next page is loaded).
> 
> Not sure whether anyone has encountered this before?
> 
> Thank you
> FooShyn
> 

Re: Multi page listing mechanism

Posted by Foo Shyn Chung <ip...@gmail.com>.
Thank Bilgin,

Sorry, forgot to mention. The version i'm trying out is ofbiz 10.4

I'm looking at *org.ofbiz.entity.util.EntityListIterator*in ofbiz source,
this is the class used throughout the whole ofbiz entity engine to pull
results for listing page?

Thanx
FooShyn

On Thu, Oct 6, 2011 at 4:54 PM, Bilgin Ibryam <bi...@gmail.com> wrote:

> On Thu, Oct 6, 2011 at 8:48 AM, Foo Shyn Chung <ip...@gmail.com> wrote:
> > Hi guys,
>
> Hi FooShyn,
>
> >
> > Would like to ask what is the mechanism used in Ofbiz for multi page
> > listing?
>
> have a look at java.sql.ResultSet.EntityListIterator class
>
> >
> > Currently we have a live site whereby the listing would resulted in a few
> > thousands rows being returned and displayed on multiple page on the
> screen.
> > We found that once the data amount hit a certain amount, the performance
> of
> > that page will become very slow.
> >
> > For listing, is Ofbiz will load up all the results in the memory, then
> only
> > segregate them into multiple page? or they only will load the data when
> the
> > user is viewing the page (i.e. when the user click next page, then the
> data
> > for the next page is loaded).
>
> the latter
>
>
> HTH
> Bilgin
>
>
> >
> > Not sure whether anyone has encountered this before?
> >
> > Thank you
> > FooShyn
> >
>

Re: Multi page listing mechanism

Posted by Bilgin Ibryam <bi...@gmail.com>.
On Thu, Oct 6, 2011 at 8:48 AM, Foo Shyn Chung <ip...@gmail.com> wrote:
> Hi guys,

Hi FooShyn,

>
> Would like to ask what is the mechanism used in Ofbiz for multi page
> listing?

have a look at java.sql.ResultSet.EntityListIterator class

>
> Currently we have a live site whereby the listing would resulted in a few
> thousands rows being returned and displayed on multiple page on the screen.
> We found that once the data amount hit a certain amount, the performance of
> that page will become very slow.
>
> For listing, is Ofbiz will load up all the results in the memory, then only
> segregate them into multiple page? or they only will load the data when the
> user is viewing the page (i.e. when the user click next page, then the data
> for the next page is loaded).

the latter


HTH
Bilgin


>
> Not sure whether anyone has encountered this before?
>
> Thank you
> FooShyn
>