News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

OpenFileDialog slooooowwww

Started by braymailloux, October 23, 2010, 03:35:19 AM

Previous topic - Next topic

braymailloux

So whenever explorer / openfiledialog opens my downloads directory its really slow. In windows defense the directory is full of a lot of stuff. I want speed, what do?

jj2007

Create a subfolder "Old_and_stale", sort by date in Explorer, and shift 90% of your stuff there.

MichaelW

In my tests with a 10.6GB target directory containing 130279 files and 15237 directories, the Open dialog opens in roughly one second. There is a lot of variation possible in the OPENFILENAME structure, and it's possible that one or more of these could have a large effect on the timing. I tested only the simplest case, and only from a console app.

;==============================================================================
    include \masm32\include\masm32rt.inc
;==============================================================================
    .data

        ofn      OPENFILENAME <SIZEOF OPENFILENAME,,,szFilter,,,,,,,,szDir>
        szFilter db "all files",0,"*.*",0,0
        szDir    db "d:\downloads",0
        ;szDir    db "c:\ ",0
    .code
;==============================================================================
start:
;==============================================================================
    invoke Sleep, 3000
    print "X",13,10
    invoke GetOpenFileName, ADDR ofn
    inkey "Press any key to exit..."
    exit
;==============================================================================
end start



eschew obfuscation

sinsi

I remember reading on an MSDN blog about files downloaded from the internet and slowdowns, possibly to do with the ADS (tagged because it came from the internet).
Unfortunately, I have no idea which blog (there are so many, it's as bad as wiki/tvtropes)  :(
Light travels faster than sound, that's why some people seem bright until you hear them.