tags:

views:

259

answers:

1

I'm going through a lot of files and on each file I need to obtain owner sid and owner ntaccount. I do this by using GetAccessControl() and GetOwner() which works great, exception for one thing. It's unbeliable slow and as far as I can see it's using a shared resource which mean I can't increase performance by using more threads. Right now I can do between 100 and 200 files a second when running through files on a network share. Is this as fast as it gets, or is there a way to improve performance on this point?

Thanks

+1  A: 

I doubt it since GetAccessControl calls CodeAccessSecurity.Check() under the hood, and that is a static call. An obvious suggestion would be to run this off the machine itself and not through a network share, but I'm not sure you would be able to do that.

Otávio Décio
I suppose you're right.
mortenbpost