Unknown delay

T

Than

Hi

I'm writing graph drawing application, and 've encountered a problem which i
dont know how to solve.

There is a function in my app, which reads graph parameters from file
(simple File/Open). For huge graphs it takes some time to read whole file
and attach
read data to appropriate data structure. So, for those bigger graphs i've
encounered something like this:
After clicking File / Open and selecting a file in modal dialol, void Load()
function is being called, it reads the file, fills the data structures of
the graph and terminates. The client is beind redrawn, and here my message
handler for clicking in File->Open (OnFileOpen()) terminates. The
application should be ready to interact with user normally at this moment.
But for about 3 seconds (on my AMD Athon 1GHz) it "hangs". It looks as the
main window would be disabled, but its not. After that delay everything is
normal, except that each message the user's generated when app was not
reacting, is being processed now (after the delay).

I have no idea what's the cause. I've debugged that function, and everything
seems ok.
I've added message processing to my function but it didn't help.

I'd be grateful for any help.

Than

I'm using Ms Visual C++ 6.0.
 
V

Victor Bazarov

Than said:
I'm writing graph drawing application, and 've encountered a problem which i
dont know how to solve.

There is a function in my app, [...]
But for about 3 seconds (on my AMD Athon 1GHz) it "hangs". It looks as the
main window would be disabled, but its not. After that delay everything is
normal, except that each message the user's generated when app was not
reacting, is being processed now (after the delay).

I have no idea what's the cause. I've debugged that function, and everything
seems ok.
I've added message processing to my function but it didn't help.

Two suggestions: read FAQ section 5, question 5.8. If you think that the
problem is in _your_ code, we would need to see the code. However, just as
you suspect, the problem is likely elsewhere. Then we cannot help and the
best you can do is to ask in a newsgroup where opening file dialogs and
hanging windows would be on topic -- comp.os.ms-windows.programmer.win32.

Best of luck!

Victor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,824
Members
47,369
Latest member
FTMZ

Latest Threads

Top