473,385 Members | 1,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Help on File.Copy speed

Hi All,

Does somebody know why File.Copy function is 10 times slower than standard
windows drag and drop copy between folders, when I copy files over the
network?
Actually, I need to copy files from one computer to another over a 1GBit
ethernet network as fast as I can. Although windows copy works at %40
performance, File.Copy could not go further than %4.

What could be the reason? What would be the best solution; is it feasible to
use the win32 API functions instead? or is there an undocumented property of
the Copy method somewhere in the framework?

Please help ASAP.

TIA
Adnan


Nov 17 '05 #1
4 3427
Hi,

It's weird that performance penalty, you may experience some but no so
drastic.

I bet that what File.Copy does is call the Win32 API to do the real job , so
I see no real improvement if you call it directly.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"adnan boz" <ab*********@hotmail.com> wrote in message
news:e%****************@TK2MSFTNGP14.phx.gbl...
Hi All,

Does somebody know why File.Copy function is 10 times slower than standard
windows drag and drop copy between folders, when I copy files over the
network?
Actually, I need to copy files from one computer to another over a 1GBit
ethernet network as fast as I can. Although windows copy works at %40
performance, File.Copy could not go further than %4.

What could be the reason? What would be the best solution; is it feasible
to
use the win32 API functions instead? or is there an undocumented property
of
the Copy method somewhere in the framework?

Please help ASAP.

TIA
Adnan


Nov 17 '05 #2
Hi,

It's weird that performance penalty, you may experience some but no so
drastic.

I bet that what File.Copy does is call the Win32 API to do the real job , so
I see no real improvement if you call it directly.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"adnan boz" <ab*********@hotmail.com> wrote in message
news:e%****************@TK2MSFTNGP14.phx.gbl...
Hi All,

Does somebody know why File.Copy function is 10 times slower than standard
windows drag and drop copy between folders, when I copy files over the
network?
Actually, I need to copy files from one computer to another over a 1GBit
ethernet network as fast as I can. Although windows copy works at %40
performance, File.Copy could not go further than %4.

What could be the reason? What would be the best solution; is it feasible
to
use the win32 API functions instead? or is there an undocumented property
of
the Copy method somewhere in the framework?

Please help ASAP.

TIA
Adnan


Nov 17 '05 #3
Both File.Copy and Win32 Copy should be equaly fast.

Willy.

"adnan boz" <ab*********@hotmail.com> wrote in message
news:e%****************@TK2MSFTNGP14.phx.gbl...
Hi All,

Does somebody know why File.Copy function is 10 times slower than standard
windows drag and drop copy between folders, when I copy files over the
network?
Actually, I need to copy files from one computer to another over a 1GBit
ethernet network as fast as I can. Although windows copy works at %40
performance, File.Copy could not go further than %4.

What could be the reason? What would be the best solution; is it feasible
to
use the win32 API functions instead? or is there an undocumented property
of
the Copy method somewhere in the framework?

Please help ASAP.

TIA
Adnan


Nov 17 '05 #4
Both File.Copy and Win32 Copy should be equaly fast.

Willy.

"adnan boz" <ab*********@hotmail.com> wrote in message
news:e%****************@TK2MSFTNGP14.phx.gbl...
Hi All,

Does somebody know why File.Copy function is 10 times slower than standard
windows drag and drop copy between folders, when I copy files over the
network?
Actually, I need to copy files from one computer to another over a 1GBit
ethernet network as fast as I can. Although windows copy works at %40
performance, File.Copy could not go further than %4.

What could be the reason? What would be the best solution; is it feasible
to
use the win32 API functions instead? or is there an undocumented property
of
the Copy method somewhere in the framework?

Please help ASAP.

TIA
Adnan


Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: abcd | last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a ljetvedehg, hard slog," mariyu vede legai pressed...
5
by: ArShAm | last post by:
Hi there Please help me to optimize this code for speed I added /O2 to compiler settings I added /Oe to compiler settings for accepting register type request , but it seems that is not allowed...
9
by: Arnold | last post by:
I need to read a binary file and store it into a buffer in memory (system has large amount of RAM, 2GB+) then pass it to a function. The function accepts input as 32 bit unsigned longs (DWORD). I...
17
by: VM | last post by:
In my Windows app, I'm running a batch process that's composed of a FOR loop that'll run 15,000 times (datatable row count), copy cthe data of each row -3 fields- to a struct, and send the strct to...
11
by: Stephan Steiner | last post by:
Hi Generally, FileInfo fi = new FileInfo(path); long size = fi.Length; gets you the length of a file in bytes. However, when copying files, even while the copy operation is still in...
0
by: adnan boz | last post by:
Hi All, Does somebody know why File.Copy function is 10 times slower than standard windows drag and drop copy between folders, when I copy files over the network? Actually, I need to copy files...
0
by: J. | last post by:
Hello all, I need some assistance. I've been out of the C++ game way too long and I need some help getting back up to speed. I'm taking a class where STL is mostly covered...I know alot of...
3
by: Mike Kelly | last post by:
Hi. I've built a page using standard ASP.NET 2.0 features and when I upload a large file (>20MB) to our intranet server, I get a paltry 100KB/s on our 100Mb/s LAN. Simply copying the file, I get...
18
by: mike3 | last post by:
Hi. I have an interesting problem. The C program presented below takes around 12 seconds to copy 128 MB of data on my machine. Yet I know the machine can go faster since a copying done at a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.