Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Big differences in speed with which a FORM loads

Avatar of IainMacb
IainMacbFlag for United Kingdom of Great Britain and Northern Ireland asked on
FoxProDell
5 Comments1 Solution556 ViewsLast Modified:
I've got a FORM in an application which seems to load very slowly by comparison with the other FORMs in the same application.

This is giving me some serious grief because the application also features an anti-piracy software key that's attached to the PC. The application talks to the software key at regular intervals. If the link with the software key drops, then the application crashes. And what seems to be happening here is that loading the FORM is taking so long that the link does indeed drop.

I've looked at what's going on inside the FORM in great detail and can't see anything obvious that would slow it down (particularly during the .INIT() methods). The FORM contains a pageframe, and buttons for [OK] and [Cancel]. The pageframe has four separate tabs. The .SCX file contains 30 records, which seem to correspond to 28 distinct objects.

I've tried embedding some timing points within the FORM. I've tried timing from starting the .LOAD() method to ending the .INIT() method. Running under VFP, that comes out at 0.02 seconds on my laptop (a rather fast Dell XPS machine).

Where's the problem, I hear you cry. Ah well, once I've compiled the application as a .EXE, it slows down. And on my laptop it takes 15.2 seconds. Which is a pretty stupendous slow-down factor.

The target machine, where we want to run the compiled code, isn't as quick as mine, so we could well be talking 30s+, which is getting into the range where the software key will time-out and terminate the application.

Next I tried putting in more intermediate timings. With these in place, it still took 15.2s. But it pointed towards one of the pages being the guilty party, taking all of the time.

There's four objects on that page. None involve any processing as part of their .INIT() method. Anyway, I put in even more intermediate timings for the objects on that particular page.

But now the elapsed time from .LOAD() to .INIT() is a mere 0.19s. The page that I had my suspicions about takes 0.13s of this. And the gap between finishing .INIT() for the last of the four objects and finishing the .INIT() for the page is all of that - the .INIT()s for the objects are all reporting as the same time.

Now, what my question is about is why I should be getting this big variation in the time taken to load the FORM - down from 15.2s to 0.19s. Does anyone have any similar experiences?
ASKER CERTIFIED SOLUTION
Avatar of Olaf Doschke
Olaf DoschkeFlag of Germany imageSoftware Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answers