About 0.2 will take to load a form, if it contains page frame and a lot of controls. Try also to out initial container onto the page in design time, add containers in run-time only for pages that are not displayed from start.
>Vlad
>
>DoCreate is already .T..
>
>I don't use many views, I try to avoid them if I can. There is quite a bit of code which I think is accounting for the other 0.8 seconds, but I haven't had time to look, I might have another look at it to see where they are going because 0.8 is quite a lot really.
>
>Thanks
>Kev
>>Hi!
>>
>>How many tables and views you have in the database? If there are many iews, they can cause slow down.
>>
>>Also, it might be good idea to add DoCreate=.T. in the SCX file, properties memo field, for main form object record (manually edit SCX as a DBF file). Accordingly to the artcile at MS site (there is also a Wiki page at fox.wikis.com called "DoCreate"), this can improve something when form is loading or creating objects. I'm not sure it can help, just try it.
>>
>>Where other 0.8 of 2 seconds are spent? Do you have much code there?
>>
>>>Vlad
>>>
>>>I did check with Profiler and noticed that tables took around 0.6 and container took around 0.6.
>>>
>>>The reason for the container is that each of our forms has buttons down the left-hand side that bring up different screens (the containers) on the form.
>>>
>>>Kev
>>>>Hi!
>>>>
>>>>It is not bad!
>>>>Just use seconds() function to calculate time interval between each table/view opening, particular method running and container initialization. I guess the most time will take container initialization. Just test it using seconds(). You can also use a coverage profiler that displays time of running of each command (relative), so you can see what parts of application run slower to see what required to be optimized.
>>>>
>>>>P.S. 50+ controls - what they all do there <:) ???
>>>>
>>>>>Hi
>>>>>
>>>>>Is it expected that a form (on a LAN) takes just over 2 seconds to load. It opens 3 tables and a view, and also adds a container object containing 50+ objects at startup?
>>>>>
>>>>>Thanks
>>>>>Kev
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.