News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

GetFiles test

Started by jj2007, May 14, 2024, 08:23:03 PM

Previous topic - Next topic

jj2007

Dear all,

Can I have some timings please? I am testing a new GetFiles implementation.

Thanks, J

AMD Athlon Gold 3150U with Radeon Graphics

\Masm32

267 ms  for new algo, 17400 files, bufsize 4096
2394 ms for old algo, 17398 files, ratio   8.937

231 ms  for new algo, 17400 files, bufsize 4096
2333 ms for old algo, 17398 files, ratio   10.07

242 ms  for new algo, 17400 files, bufsize 4096
2342 ms for old algo, 17398 files, ratio   9.640

It yields only *.as?, *.dll, *.rc, *.inf, *.txu and *.etl files in your \Masm32 folder. Start the exe from a DOS prompt on your \Masm32 drive.

sinsi

Not sure how much use this is  :biggrin:
5 ms    for new algo, 936 files, bufsize 4096
44 msng for old algo, 936 files, ratio   7.390

5 ms    for new algo, 936 files, bufsize 4096
36 msng for old algo, 936 files, ratio   7.192

5 ms    for new algo, 936 files, bufsize 4096
35 msng for old algo, 936 files, ratio   6.330
msng?
🍺🍺🍺

jj2007

Quote from: sinsi on May 14, 2024, 08:50:14 PMNot sure how much use this is

You get a complete folder tree in a Files$(index) array. For me it's occasionally useful :biggrin:

sinsi

OK, I was thinking that 936 files was a small sample size timing-wise compared to 17400.
🍺🍺🍺

jj2007

No problem, the ratios are pretty clear: about a factor 7. Btw the commandline accepts any folder path, in case you want to test it, at your own risk, with C:\Windows :badgrin:

zedd151

#5
Quote from: sinsi on May 14, 2024, 09:13:48 PMOK, I was thinking that 936 files was a small sample size timing-wise compared to 17400.
Me too. From my E: drive

C:\Users\Administrator\Downloads\GetFilesNew>GetFilesNew.exe


Intel(R) Core(TM)2 Duo CPU    E8400  @ 3.00GHz

E:\

1873 ms for new algo, 36843 files, bufsize 4096
7735 ms for old algo, 36859 files, ratio  4.129

1095 ms for new algo, 36843 files, bufsize 4096
7886 ms for old algo, 36859 files, ratio  7.197

1181 ms for new algo, 36843 files, bufsize 4096
7807 ms for old algo, 36859 files, ratio  6.609

C:\Users\Administrator\Downloads\GetFilesNew>pause
Press any key to continue . . .
Hmmm..
The new algo is missing some files, in my test.
The old algo missing a couple in your test, jj.
Not good for the case where those missing files were the ones I might have been searching for.
It seems that the two algos do not behave in the same manner == not equal. There are hiccups in both, it appears.
If the results are not identical between the two algos, the test is invalid - results must be verified for accuracy. If the results do not match between the two different algos... ???

jj2007

Quote from: sudoku on May 14, 2024, 11:13:07 PMThe new algo is missing some files, in my test.
The old algo missing a couple in your test, jj.

Can you give me an example? The old one finds more files because it accepted xx.inf_loc (frequent in WinXSX) as *.inf, which was wrong imho, so I eliminated that behaviour. The new one should not miss any files, in theory, so I'd be grateful if you could give me examples of missing files.

zedd151

Quote from: jj2007 on May 15, 2024, 12:24:37 AMThe new one should not miss any files, in theory, so I'd be grateful if you could give me examples of missing files.
The first test had the drive listed as E:\ I changed it to E: as there were two backslashes in the first round.

Intel(R) Core(TM)2 Duo CPU    E8400  @ 3.00GHz

E:

2042 ms    for new algo, 36843 files, bufsize 4096
Running GetFiles
8474 ms    for old algo, 36859 files, ratio  4.150

1150 ms    for new algo, 36843 files, bufsize 4096
Running GetFiles
8545 ms    for old algo, 36859 files, ratio  7.425

1131 ms    for new algo, 36843 files, bufsize 4096
Running GetFiles
8491 ms    for old algo, 36859 files, ratio  7.508
Attachment removed as the intended recipient has received it.

jj2007

Thanks, very useful :thumbsup:

NewF.txt, line 3024:
E:\archive...scripts\pass

A file with no extension; I'll have to check how to deal with that :cool:

GetF.txt, line 6076:
E:\archive...test\.asm

Not found by the new algo - hmmmm... new version attached, should solve this problem.

zedd151

#9
File was produced by an errant program.  :biggrin:  "I've been through the desert on a horse file with no name"...

jj2007

Yes, you have plenty of them. Version 2 ^^^ should find them.

zedd151

Is that where all the 'missing' files were not found?
I'll run the latest version when I get back in front of my computer.

zedd151

#12
Hmmm... using drive E: as an argument produces this now:
Image removed.

I really don't need a list of the masm32 examples folder.  :smiley:

But if you insist...
D:\>GetFilesNewV2.exe
Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz

\Masm32\Examples

6 ms    for new algo, 474 files, bufsize 4096
47 ms   for old algo, 474 files, ratio   6.919

D:\>pause
Press any key to continue . . .

btw hard coding the E: drive (as search path) in olly produces similar results as in the png image above and no filelist files produced, in either case.
Anyway, I cannot change the path to recreate the original search on my "E:" drive... and successfully create the file listings with any of the methods I had tried.

Is there any way that you could use a dialog box for the user to select the path to search, similar to my file lister Here ??? That would simplify it a bit. (At least for the user)

jj2007

Weird, that dialog with E:...

AMD Athlon Gold 3150U with Radeon Graphics

E:

54 ms   for new algo, 368 files, bufsize 4096
374 ms  for old algo, 368 files, ratio   6.914

Is your E: drive extremely full?

sinsi

Tried with C:\ (C: gives a different result, are you using relative paths?)
(3e68.280c): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=c0000005 ebx=0018af28 ecx=00000058 edx=0018add8 esi=0018aee8 edi=0018c247
eip=00007300 esp=0018adf8 ebp=65006c00 iopl=0        nv up ei ng nz na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b            efl=00010286
00007300 ??              ???

Call Stack Return Address = GetFilesNewV2+0x8078
00408078  61 73 3f 20 64 6c 6c 20-72 63 20 20 69 6e 66 20  as? dll rc  inf
00408088  74 78 75 20 65 74 6c 20-00 5c 2a 2e 61 73 3f 7c  txu etl .\*.as?|
00408098  2a 2e 64 6c 6c 7c 2a 2e-72 63 7c 2a 2e 69 6e 66  *.dll|*.rc|*.inf
004080a8  7c 2a 2e 74 78 75 7c 2a-2e 65 74 6c 00 00 00 00  |*.txu|*.etl....
004080b8  5c 6e 25 69 20 6d 73 00-5c 74 66 6f 72 20 6e 65  \n%i ms.\tfor ne
004080c8  77 20 61 6c 67 6f 2c 20-25 69 20 66 69 6c 65 73  w algo, %i files
004080d8  00 00 00 00 2c 20 62 75-66 73 69 7a 65 20 25 69  ...., bufsize %i
004080e8  00 00 00 00 4e 65 77 46-2e 74 78 74 00 00 00 00  ....NewF.txt....
🍺🍺🍺