Unknown delay

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Than

    Unknown delay

    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.


  • Victor Bazarov

    #2
    Re: Unknown delay

    "Than" <than@gazeta.pl > wrote...[color=blue]
    > I'm writing graph drawing application, and 've encountered a problem which[/color]
    i[color=blue]
    > 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[/color]
    everything[color=blue]
    > seems ok.
    > I've added message processing to my function but it didn't help.[/color]

    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.program mer.win32.

    Best of luck!

    Victor


    Comment

    Working...