OpenFileDialog/c# slow on any file. better solution?

前端 未结 4 654
栀梦
栀梦 2020-12-16 12:34

I am opening a file using the OpenFileDialog in c# and I am noticing it is taking between 20-40 seconds to load my file and clear the dialog.

Here is my sample code

4条回答
  •  醉酒成梦
    2020-12-16 12:58

    You can use a free tool like ProcExp (SysInternals.com) to monitor what your application is doing during the lag. Is it scanning the file system? The registry? The network (maybe it is trying to connect to a network share that is slow to respond).

    BTW, you can run ProcExp.exe without installing it from http://live.sysinternals.com/!

提交回复
热议问题