Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms loading slow

Status
Not open for further replies.

ictoo

Programmer
Sep 3, 2009
33
GB
I’ve been working on this program awhile now and its got quite bulky, its basically one page frame with about 30 pages, now when I run the form it seems to have no problem, but when I’m closing it and first opening the form from the project window that it takes about 5 seconds to load, is this something that will have a knock on affect when I compile and build my program? Are there ways to help with the speed with large programs like this?
 
I would suspect the data sources - do you have combo or list boxes that need to be filled from remote sources?





Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
i have alot of text boxes being filled from tables in my data environment, i did think they get first when the form is run but when the page they are on is activated? Also i have alot of tables in my data environment and tables that are added more than once.
 
Where are the tables, or the data for the tables, located in relation to the client machine running your VFP app?

If they are local, there should be practically speed degradation - but if they have to be accessed across a slow network, or come down from a SQL server (and there are a lots) it could take a time for the data to be presented.

Martin

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Ictoo,

It sounds like you're overloading the pageframe. 30 pages is a lot of pages for the user to deal with. And if the pages contain many controls that have a control source, that's a lot of tables to be opened and positioned at the correct records.

Regardless of whether you find a way of avoiding the five-second delay, I would suggest you consider some other mechanism for doing this job.

Does the user always need to access all 30 pages in the same session? Or is it a case of some pages being accessed all the time, and others only infrequently? If so, it might be better to restrict the page frame to the more important pages, and to use subsidiary forms for the others.

I'm thinking about this from the user interface point of view, but this sort of approach might also be better for performance.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
The tables are accessed from a local server, and like you said it would be slow if the network decided to be slow on that day.

The pageframe was used so all information could be accessed at the same time, the tabs are hidden and the user just uses buttons to get around them, but i'll see if i can cut back on this by how you said using different forms for each aspect for the program.

Thanks for the advice griff and mike, i'll take it in to consideration.
 
30 pages is just plain too many. Break it down to multiple forms. It actually becomes difficult to use because it's hard to find the page you want.

Another option is to place all the controls for each page into separate container objects. One container per page. Then add it to the page the first time it is shown.

Craig Berntson
MCSD, Visual FoxPro MVP,
 
Hi!
Apart from all good advices:
I once had a form which also became visible after a too long time. I couldnot find the reason.
At longlast I recreated that form and waiting-time was gone.
-Bart
 
Bart

Do you mean there was stuff in the original form which was slowing it down - a sort of 'garbage' problem caued by frequent editing or copying and modifying old forms?

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Griff,
Maybe that was the case. In fact it was a certain control which caused the slow-down. But as this was times ago I don't remember exactly al those figures. I presume it was a combobox. But the thing I do remember is that I didnot changed code.
-Bart
 
Bart,

That's good advice. But I think in this case, the problem is simply that the form has too many pages and too many controls.

Let's see what happens after Ictoo has tried simplifying it.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top