Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Program take 30+ seconds to start



Permlink Replies: 7 - Last Post: May 12, 2017 9:37 AM Last Post By: Michael Georgi Threads: [ Previous | Next ]
Doug Hay

Posts: 122
Registered: 5/26/05
Program take 30+ seconds to start
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 28, 2015 12:04 PM
I built two new Windows 7 Pro desktops. Same motherboard, same Intel processor, same version of Windows, very similar machines. One machine is at my home office, the other is at a off-site location.

Both have C++ Builder XE8 installed. On my home office PC, my program is visible about 5 seconds after pressing F9 (run). On the off-site PC, the startup time is closer to 1 minute. And when I close the app it is also very slow, about 30 seconds or more.

The source code is identical on both PC's. The build time (Build all) is very close on both PC's, the PC's both run very fast while running other XE8 programs, just this one program is causing problems.

I'm not sure where to start looking for a problem. I have disabled AVAST, this had no effect. There are no other anti-virus or anti-malware programs. So what's the best way to track down this issue?

Thanks for the help!
Doug
Josh Kelley

Posts: 75
Registered: 3/6/08
Re: Program take 30+ seconds to start
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 29, 2015 6:45 AM   in response to: Doug Hay in response to: Doug Hay
On 9/28/2015 3:04 PM, Doug Hay wrote:
I built two new Windows 7 Pro desktops. Same motherboard, same Intel processor, same version of Windows, very similar machines. One machine is at my home office, the other is at a off-site location.

Both have C++ Builder XE8 installed. On my home office PC, my program is visible about 5 seconds after pressing F9 (run). On the off-site PC, the startup time is closer to 1 minute. And when I close the app it is also very slow, about 30 seconds or more.

The source code is identical on both PC's. The build time (Build all) is very close on both PC's, the PC's both run very fast while running other XE8 programs, just this one program is causing problems.

I'm not sure where to start looking for a problem. I have disabled AVAST, this had no effect. There are no other anti-virus or anti-malware programs. So what's the best way to track down this issue?

I assume you're running in the debugger, off the local hard drive, and
haven't done anything (like code signing) to modify the executable in a
post-build step?

Have you tried running Process Monitor? It should be able to tell you
what the program is doing at the point when the slowdown occurs. You
could even run it on both computers, export the results, then compare
them to see what the difference is.

--
Josh Kelley
Doug Hay

Posts: 122
Registered: 5/26/05
Re: Program take 30+ seconds to start
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 6, 2015 9:54 AM   in response to: Josh Kelley in response to: Josh Kelley
Thanks Josh.

Is Process Monitor a Windows program, or a third party tool?

I think I've got it narrowed down to my Advantage Database. I look at the database fields to make sure they all exist, and it takes a LONG time!
Josh Kelley

Posts: 75
Registered: 3/6/08
Re: Program take 30+ seconds to start
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 6, 2015 10:21 AM   in response to: Doug Hay in response to: Doug Hay
On 10/6/2015 12:54 PM, Doug Hay wrote:
Is Process Monitor a Windows program, or a third party tool?

It's part of Microsoft's Sysinternal's suite:

https://technet.microsoft.com/en-us/library/bb896645.aspx

It can capture and display every filesystem and registry operation that
occurs while it's running, which makes it very useful for questions
like, "What exactly is this program doing right now?"

--
Josh Kelley
Michael Georgi

Posts: 7
Registered: 3/27/15
Re: Program take 30+ seconds to start
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 3, 2017 3:02 AM   in response to: Doug Hay in response to: Doug Hay
Doug Hay wrote:
Thanks Josh.

Is Process Monitor a Windows program, or a third party tool?

I think I've got it narrowed down to my Advantage Database. I look at the database fields to make sure they all exist, and it takes a LONG time!

Hi Doug, was it really your database access? Why was it then only on one machine and not on the other? I have this startup time problem now since years (from XE7 until 10.2 Tokyo), in my case it helps to disable the network adapter! On my 2nd machine I have no issue.
Doug Hay

Posts: 122
Registered: 5/26/05
Re: Program take 30+ seconds to start
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 3, 2017 8:30 AM   in response to: Michael Georgi in response to: Michael Georgi
It was a the SSD disk drive, I think the interface was set incorrectly making a very fast drive run about 1000 times slower than normal.
Michael Georgi

Posts: 7
Registered: 3/27/15
Re: Program take 30+ seconds to start
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 12, 2017 9:37 AM   in response to: Doug Hay in response to: Doug Hay
Doug Hay wrote:
It was a the SSD disk drive, I think the interface was set incorrectly making a very fast drive run about 1000 times slower than normal.

Thanks for this information. It's a pity that it is not matching to my problem ...
Harry Bego

Posts: 22
Registered: 1/27/09
Re: Program take 30+ seconds to start
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2015 1:26 AM   in response to: Doug Hay in response to: Doug Hay
You may want to check whether your code is reading a VCL control somewhere inside a loop. I recently had something similar where a routine would run in 3 seconds, or in 45 seconds, depending on unclear circumstances. Inside a loop in a loop it read a TUpDown::Position value. After I replaced that with a variable, it always runs in 3 secs. Took me a day to find out..

Harry
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02