PerlingTheUK has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks, I need to get a file of approx. 140 MB into a data structure to get some results from this. The GUI is Tk. Reading and loading the whole file into its representing objects takes about 4 minutes. During this time Windows assumes that my application is not responding.
Once finished loading everything is fine. I plan to change the loading process soon and add a status bar. Yet I want to prevent Win to show the application as not responding. Where do I find information on how to do so? I also wondered if there is some graphical application to visualize the tmon.out files produced with DProf. Thank you very much. Hans

Replies are listed 'Best First'.
Re: Win32 / Not responding
by matija (Priest) on Jul 09, 2004 at 13:13 UTC
    That probably comes from your application leaving events in it's message pipe for those 4 minutes. If you're not reading the whole file in a single statement (and I certainly hope you aren't), you should put some $mainwindow->update calls in there.

    Having them there will make it easier to add the status bar, anyway.

      I do, as I started out with 5 MB files and hope to change to a database soon.
Re: Win32 / Not responding
by gri6507 (Deacon) on Jul 09, 2004 at 13:08 UTC
    I haven't tried this on windows myself, but you should be able to have two processes/threads where one does the GUI stuff and another does the work stuff and the worker process updates the GUI process with progress information, which can be shown in a progress bar. Take a look 372392 for an example
Re: Win32 / Not responding
by Chady (Priest) on Jul 09, 2004 at 13:20 UTC

    I believe you are using WindowsXp.

    That's an issue that started with Xp, and I believe it was done to give you control over the application that seems to be not-responding (by replacing the titlebar so that the close button is accessible, and it tags the application "Not Responding")

    It happens to a lot of apps, and I doubt it can be changed. try opening a 100Mb file in photoshop, it will do the same.


    He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

    Chady | http://chady.net/
      Chady, this didn't start with WinXP. It's been an issue with any Win32 since NT. You can see my first post, Application Not Responding, as another example and see one solution.

      PerlingTheUk, did you bother to try a search on Not Responding before you posted this question? You'll find several threads on this exact issue. Next time, try using search first to see if your question has already been asked & answered.

      - - arden.