Page 1 of 1

Foundset size

PostPosted: Mon Oct 03, 2011 9:58 pm
by joshuahysong
Quick question. Is it possible to increase the default number of rows that a foundset will load? We would like to load more than 200 rows when launching the form.

If so, how is this done and are there any consequences other than performance hits for doing so?

Thanks!

Re: Foundset size

PostPosted: Mon Oct 03, 2011 10:02 pm
by Harjo
Hi Joshua, you can load more than 200 records, by jumping yourself to recordIndex 199 or 200. or by loading the foundset, by a dataset with pk's
that will also drastically decrease performance.

But I'm curious, what is the reason why you wanna do that? can a client look at more than 200 records in a time, at once?

Re: Foundset size

PostPosted: Mon Oct 03, 2011 10:07 pm
by joshuahysong
Currently we are just curious how bad the performance drop will be versus the convenience of the user being able to scroll down a table view and not have to rescroll again once the next block of the foundset is loading.

I was hoping that there was a server option or setting hidden somewhere that would let you change the default # of rows without have to change the selected index to force it within the client.

Re: Foundset size

PostPosted: Mon Oct 03, 2011 10:42 pm
by Harjo
no there is no setting for that right now.

but you can try and see it by doing a query, and retrieve a pk dataset of about 10.000 records.
load that dataset into a foundset: foundset.loadRecords([vPK])

than you will see the performance degree

Re: Foundset size

PostPosted: Mon Oct 03, 2011 10:44 pm
by joshuahysong
We'll try that. Thanks!

Re: Foundset size

PostPosted: Tue Oct 04, 2011 1:15 am
by rsieb
Hi

Or you can use the table bean plugin and load it with a dataset rather than a foundset. This is much faster than using foundsets but you have to polish up on your sql.

Loads as many records as you want and you can scroll from one end of the list to the other in a split second. I have a table with 13K records that loads almost instantly, the users can scroll from one end of the table to the other without issue very rapidly.

Only works in smart client though.

Re: Foundset size

PostPosted: Fri Oct 14, 2011 4:59 pm
by jcompagner

Re: Foundset size

PostPosted: Fri Oct 14, 2011 5:50 pm
by joshuahysong
Wow

I did not see that line entry in 5.2.8 so I added the line "servoy.foundset.pkChunkSize=2000" from your link to the properties file and it is fantastic!

Exactly what I was wanting and barely a noticeable performance hit.

Thanks!

Re: Foundset size

PostPosted: Fri Oct 14, 2011 9:02 pm
by rgansevles
joshuahysong,

Note that your memory usage may increase, this is a server-wide setting affecting all foundsets.

Rob

Re: Foundset size

PostPosted: Sat Oct 15, 2011 9:25 am
by Harjo
Wauw, totally missed this...... :shock: