Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Instantiation affects processing speed
Message
From
15/12/2001 17:06:56
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
 
To
15/12/2001 16:29:23
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00594848
Message ID:
00594855
Views:
23
Hi Steve,
So if I understand, the grids seem to slow the processing, perhaps due to fact they have a visible and refreshable component.
One option might be to free the grids from the data work going on. You could create a view and requery the view when the processing is done. This way the grid's recordsource is the view, not the 'actual' cursor with the data. You can create a cursor with the right structure to base a view on, insert whatever is needed initially, REQUERY() the view based on this cursor, then tear the cursor appart--whatever you want--just get the data in it, then REQUERY().
You can even do this at runtime.
CREATE DATABASE ViewHolder
CREATE CURSOR ViewSource (Field1 N)
CREATE SQL VIEW GridView AS SELECT * FROM ViewSource WHERE x ORDER BY y


>I'm revisiting instantiation as I optimize a rather complex form.
>
>I have a form that accomplishes basically two tasks.
>
>Task #1 is a multi-pass process thru a database creating ratings based on various field values and user criteria.
>
>Task #2 is displaying the data on a 10 page, pageframe - each page with its own custom grid - user needs to see the data sliced/diced in a lot of different layouts.
>
>---
>
>I'm trying to optimize the processing speed of task #1.
>
>If I run task #1 without the grids instantiated (run code prior to opening form with grids) I see an acceptable processing time.
>
>Because the user can change criteria, task #1 needs to be run after instantiation of grids - so I run it from inside the form with the grids.
>
>In that case, I see an unacceptable processing time. (factor of 10 or so).
>
>---
>
>What means can I use (I'd rather not release all the grids as the user will have selected various sort orders and layouts) to be able to run task #1 while the grids are instantiated?
Charlie
Previous
Reply
Map
View

Click here to load this message in the networking platform