Displaying Data on a form ... performance issue

Discuss OrbForms Designer and PocketC Architect

Postby kac on Wed Nov 13, 2002 1:44 pm

I am working on an app and enter up to 150 records of data. I was using a string list to display the data on a form, but noticed that once the list reached around 10 records the redisplay between each add became longer and longer.

Is there a more effecient way to display a data list which would be used to do record selection for edit/delete etc.

Would need to accomodate scrolling and possibly sorting as well.
Posts: 18
Joined: Thu Oct 17, 2002 12:12 pm

Postby stenci on Wed Nov 13, 2002 3:53 pm

Did you try hiding the list during the update?
Posts: 9
Joined: Wed Nov 06, 2002 3:40 pm
Location: Italy

Postby jims on Wed Nov 13, 2002 4:54 pm

Not sure exactly what you mean... Are you storing the stringList for a popup list, or for all data on the form?
Posts: 34
Joined: Wed May 22, 2002 4:01 pm
Location: USA

Postby kac on Wed Nov 13, 2002 5:20 pm

I was using the string list as a simple implementation of a scrolling list of data which also provided an onselect event for single record access. I am open to any process suggested to display data in a table format where a user can select a record for edit/update.
Posts: 18
Joined: Thu Oct 17, 2002 12:12 pm

Postby jims on Wed Nov 13, 2002 9:44 pm

I just read directly from the database to show the data, the only problem I had related to speed was that for databases that have big records (the record size, not the number of records) it would get kind of slow. So what I do in that case is keep all the data that I want to show in the "summary" at the start of the record, then I only read in the first part of the record.

BTW, I have a "TableGadget" which is used in the "Gear Chart Calculator" application, and an updated version of the "Survey" application that you can download from http://members.cox.net/jims2/

If your interested I could email you the TableGadget. Also, I have a couple object's which make managing a Datatabase and a Database form easier, DBFormObject and DBManagerObject which are used in the Survey example.

- jim
Posts: 34
Joined: Wed May 22, 2002 4:01 pm
Location: USA

Postby kac on Thu Nov 14, 2002 11:43 am

Thanks Jim,

I would appreciate both the Tablegadget and the Database manager. Send to my email at kacpalm@yahoo.com.

I am currently working on a Graphgadget and will be glad to pass to you when it is completed.

Posts: 18
Joined: Thu Oct 17, 2002 12:12 pm

Postby nyates on Wed Nov 20, 2002 6:55 pm

Jim - Could I get a copy of your Tablegadget and Datamanager as well? I checked out your site (and the sample programs) and it looks perfect for the app I am working on. Thanks


Posts: 9
Joined: Wed May 16, 2001 5:10 pm

Postby fredoak on Fri Nov 22, 2002 12:46 pm

Jim can you make that 3

Posts: 32
Joined: Tue May 14, 2002 10:54 am
Location: USA

Postby chris on Fri Dec 13, 2002 5:21 am

Jim, I'd like a copy of your TableGadget source too. I'm working on an app that creates a list box from DB records, and when the user selects a record, I have to go back to the DB and pull up the complete record. My DB has over 300 records in it (albeit small records), and its unbearably slow. Hopefully your gadget will help (or at least I can glean some wisdom from it). Please send to chris@highstream.net.

Posts: 3
Joined: Fri Dec 13, 2002 5:15 am
Location: USA

Postby design4use on Fri Dec 13, 2002 12:49 pm

Basically a design strategy can be this:

- at any point in time you draw only the ten or so items that fit on one screen, and you keep track of where you are on the overall list
- also when the user scrolls down by less then one screen full you can re-use a portion of the previously drawn list, shift that up or down by x * lineheight and just draw the newly visible ones
- you can also increase perceived speed of fetching record by building a cache of say the 10 recs on screen and 10 before and 10 after. Then you biuld logic around when the user navigates up or down of trying to fetch thye record from the cache first, if its not there rebuilding part of/ shifting the cache in the direction the user went. That way you are very fast 90% of the time and a bit slower 10% of the time instead of sluggish 100% of the time.
Posts: 128
Joined: Fri May 10, 2002 3:31 pm

Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 1 guest