473,386 Members | 1,827 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,386 software developers and data experts.

Copy files - buffered streams vs File.Copy

1
Hi,
I need to implement a high performance file copying.
The File.Copy method in .NET is fast enough however I need to control the speed since it should be performed in the background without affecting the process too much.
I've implemented a buffered (FileStream) copy using a queue for the bufferes.
The performance is about 60% slower than the File.Copy.

I've heard something about unbuffered stream, however I couldn't find anything usefull in the net.
Can anyone spread his wisdom one this method?
Any idea how can I improve the buffered copy mechanism?

Thanks a lot.
Apr 3 '08 #1
1 2210
r035198x
13,262 8TB
Hi,
I need to implement a high performance file copying.
The File.Copy method in .NET is fast enough however I need to control the speed since it should be performed in the background without affecting the process too much.
I've implemented a buffered (FileStream) copy using a queue for the bufferes.
The performance is about 60% slower than the File.Copy.

I've heard something about unbuffered stream, however I couldn't find anything usefull in the net.
Can anyone spread his wisdom one this method?
Any idea how can I improve the buffered copy mechanism?

Thanks a lot.
I haven't got your requirements correctly yet, sorry I always seem to miss the obvious.
Do you want your "buffered copy mechanism" to go faster or slower than the File.Copy method?
Also by "improving" it, do you mean you want it to be faster than it is now?
If that's the case, then you'll need to post how you've done it so that people can see where to improve.
Apr 3 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

19
by: Claudio Grondi | last post by:
I would like to save time copying the same file (>6 GByte) to various different target storage media connected to the system via USB. Is there a (Python or other) tool able to help me to do...
8
by: MattP | last post by:
Ok, with the help of some examples found on the web and some minor modifications on our own, we have a simple and working encrypt and decrypt solution. It runs as a service, watches for files with...
7
by: Steven T. Hatton | last post by:
I haven't looked very closely, but from what I'm seeing, it looks like there are no buffered I/O streams in the Standard Library. There are stream buffers, but not buffered streams. I don't have...
2
by: Toby Doig | last post by:
When I try to import data from a unicode file into PostgreSQL 7.4 under FreeBSD it appears to now understand the Unicode file format. To demonstrate I export a set of Integers into a Unicode file...
9
by: kernelxu | last post by:
hi,everybody. I calling function setbuf() to change the characteristic of standsrd input buffer. some fragment of the progrem is: (DEV-C++2.9.9.2) #include <stdio.h> #include <stdlib.h> int...
1
by: Jorge Ribeiro | last post by:
Hello I've an ASP.NET Web application that has one form where the user can upload a file to be sent and saved on a database. The app sends the file via DIME attachments and SOAP envelopes to a...
4
by: hzgt9b | last post by:
Usig VB .NET 2003, I'm writing a simple app that copies 1 or more files. Requiremtns state that I need two progress bars one for current file copy progress and one for overall progress. My...
9
by: Justin Rich | last post by:
looking for the best approach to reading a real time log file. The file gets updated pretty quickly, always appended to the end. do i really need to just keep re-opening the file and reading the...
4
by: per9000 | last post by:
Hi python people, I am trying to figure out the best way to encrypt files in python. I've build a small script (see below) that encrypts the ubuntu 7.04 iso file in 2 minutes (I like python :)...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.