Search code examples
gooptimizationwindow

Another way to get files owner than from advapi32 on windows


I'm working on a golang script who get fileInfo and owner from every file using go 1.10.3 on a 32 bit windows. My script work well but im facing a problem. The library advapi32 and more specificly GetNamedSecurityInfoW and LookupAccountNameW functions take around 1 millisecond since I've got a big amount of files the "scan" is obviously too long. I just wanted too now if there's another way to do it faster ? I'm open on any suggetion or help Thanks.


Solution

  • Thank you gonutz i managed to make it quite faster with goroutine, I aproach 2 500 000 files every 22minute. And my algorythm is still not optimised.