Saturday, September 10, 2011

The Open File Dialog Plurality

Open a Notepad instance and check how many threads the notepad.exe creates using the Task Manager. (If the Task Manager does not show the number of threads column in the Process tab, then enable it from the View > Select Columns... menu).

One thread and 1364 KB of memory (on a Windows 7 64 bits OS).

Now, in notepad open the Open File dialog (and keep it open), and check the number of threads again.

22 threads! And 9400 KB of memory.

Now cancel  the Open File dialog. A number of 18-21 number of threads will still be there!

Is this a waste of resources? Or is this an intended waste of resources?