Home All Groups Group Topic Archive Search About

Directory Sizes and Performance

Author
30 Apr 2007 10:44 AM
Flinky Wisty Pomm
Hi all,

I need to regularly traverse a large networked file system and return
a list of directories and their respective sizes. The file system is
large enough that performance is a serious concern.

As well as the recursive [File/Directory]Info solution, I've seen
reference to using the FileSystemObject or calls to FindFirstFile/
FindNextFile via COM interop.

Does anybody know the fastest way of doing this in .Net?

-- Bob

Author
30 Apr 2007 9:32 PM
Vijay
Whatever you do, do not use COM interop if you care for performance. I
believe there are some classes in BCL that can retrieve information u need ,
like querying AD (active directoy) that type of thing.

HTH

Show quote
"Flinky Wisty Pomm" wrote:

> Hi all,
>
> I need to regularly traverse a large networked file system and return
> a list of directories and their respective sizes. The file system is
> large enough that performance is a serious concern.
>
> As well as the recursive [File/Directory]Info solution, I've seen
> reference to using the FileSystemObject or calls to FindFirstFile/
> FindNextFile via COM interop.
>
> Does anybody know the fastest way of doing this in .Net?
>
>  -- Bob
>
>
Author
2 May 2007 4:16 AM
G Himangi
The File/DirectoryInfo and other classes like
Directory.GetFiles/GetDirectories also use FindFirstFile/FindNextFile via
P/Interop. In the case of FileInfo, these are used once for each FileInfo.
In case of GetFiles/GetDirectories, these are used once for each
enumeration.

---------
- G Himangi,   Sky Software       http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
---------



Show quote
"Flinky Wisty Pomm" <Pathoge***@gmail.com> wrote in message
news:1177929894.318946.49250@q75g2000hsh.googlegroups.com...
> Hi all,
>
> I need to regularly traverse a large networked file system and return
> a list of directories and their respective sizes. The file system is
> large enough that performance is a serious concern.
>
> As well as the recursive [File/Directory]Info solution, I've seen
> reference to using the FileSystemObject or calls to FindFirstFile/
> FindNextFile via COM interop.
>
> Does anybody know the fastest way of doing this in .Net?
>
> -- Bob
>

AddThis Social Bookmark Button