Discussion:
slow network performance in directory.getfiles
(too old to reply)
Marcel
2004-01-18 23:11:57 UTC
Permalink
Hi All,

I'm getting big diferences in local versus network performances.
When I use Directory.GetFiles of DirectoryInfo.GetFiles on a local path with
some 11.000+ files,
it executes under 4 second. When I do the same over a network (UNC and
mapped) it takes a whopping 126 second. I've also tested it with win32 api
call but that still isn't much faster.
I ended up using a small remoting server with does it under 6 seconds.
Is this .net related or os-related? is there a faster way?
I've tested on a 100Mbit network with Windows 2000 Server SP4, Windows XP
Professional SP1 and Windows 2003 Server. Framework is 1.1
All code in debug mode.

Marcel
Justin Rogers
2004-01-19 02:52:52 UTC
Permalink
You say the Win32 API isn't much faster, so I think you nailed your own
question. The
OS in this case is imposing some form of bottleneck on enumerating files over a
UNC path.
This wouldn't be at all surprising since there are probably a number of security
operations
being performed, that probably don't happen when you use your remoting server.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers
Post by Marcel
Hi All,
I'm getting big diferences in local versus network performances.
When I use Directory.GetFiles of DirectoryInfo.GetFiles on a local path with
some 11.000+ files,
it executes under 4 second. When I do the same over a network (UNC and
mapped) it takes a whopping 126 second. I've also tested it with win32 api
call but that still isn't much faster.
I ended up using a small remoting server with does it under 6 seconds.
Is this .net related or os-related? is there a faster way?
I've tested on a 100Mbit network with Windows 2000 Server SP4, Windows XP
Professional SP1 and Windows 2003 Server. Framework is 1.1
All code in debug mode.
Marcel
Marcel
2004-01-19 12:22:21 UTC
Permalink
OK, but it's a big overhead. I didn't thought about the security.
That means that there's a lot of room for improvement in that area.
But 'm calling the api from .net, isn't that also slowing down things?
Post by Justin Rogers
You say the Win32 API isn't much faster, so I think you nailed your own
question. The
OS in this case is imposing some form of bottleneck on enumerating files over a
UNC path.
This wouldn't be at all surprising since there are probably a number of security
operations
being performed, that probably don't happen when you use your remoting server.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers
Post by Marcel
Hi All,
I'm getting big diferences in local versus network performances.
When I use Directory.GetFiles of DirectoryInfo.GetFiles on a local path with
some 11.000+ files,
it executes under 4 second. When I do the same over a network (UNC and
mapped) it takes a whopping 126 second. I've also tested it with win32 api
call but that still isn't much faster.
I ended up using a small remoting server with does it under 6 seconds.
Is this .net related or os-related? is there a faster way?
I've tested on a 100Mbit network with Windows 2000 Server SP4, Windows XP
Professional SP1 and Windows 2003 Server. Framework is 1.1
All code in debug mode.
Marcel
Andy Becker
2004-01-22 00:30:07 UTC
Permalink
"Marcel" wrote in message...
Post by Marcel
OK, but it's a big overhead. I didn't thought about the security.
That means that there's a lot of room for improvement in that area.
But I'm calling the api from .net, isn't that also slowing down things?
A dumb question, perhaps. Any copies of Norton Anti-Virus involved?
Loading...