Click here to Skip to main content
15,887,267 members
Home / Discussions / C#
   

C#

 
Questionc# file I/O looking strange in task manager Pin
Dan Wulff1-Apr-15 11:16
Dan Wulff1-Apr-15 11:16 
SuggestionRe: c# file I/O looking strange in task manager Pin
Richard Deeming1-Apr-15 11:22
mveRichard Deeming1-Apr-15 11:22 
GeneralRe: c# file I/O looking strange in task manager Pin
Dan Wulff1-Apr-15 11:46
Dan Wulff1-Apr-15 11:46 
AnswerRe: c# file I/O looking strange in task manager Pin
Brisingr Aerowing1-Apr-15 11:23
professionalBrisingr Aerowing1-Apr-15 11:23 
GeneralRe: c# file I/O looking strange in task manager Pin
Dan Wulff1-Apr-15 11:44
Dan Wulff1-Apr-15 11:44 
AnswerRe: c# file I/O looking strange in task manager PinPopular
Richard MacCutchan1-Apr-15 21:15
mveRichard MacCutchan1-Apr-15 21:15 
GeneralRe: c# file I/O looking strange in task manager Pin
Dan Wulff2-Apr-15 10:31
Dan Wulff2-Apr-15 10:31 
AnswerRe: c# file I/O looking strange in task manager Pin
Gerry Schmitz1-Apr-15 21:31
mveGerry Schmitz1-Apr-15 21:31 
Use a virtual disk drive! (Just kidding).

The file you are reading and writing is actually 1MB; not 16MB.

"Reads" and "writes" are usually buffered; in your case however, due to "positioning", you seem to be losing the benefits of buffering in your reads.

While "logically", you are only reading about 1MB, in actuality, you are reading about 4GB with each iteration.

Sector sizes / allocation units are running around 4KB these days; this is what you are transferring between disk and memory for each one of your reads; and why you are seeing those high transfer rates (300MB/sec).

Unless this is some specific "disk exercise", I suggest you do all your "reading and writing" to a byte array and then just write the whole thing out when you're done.

(Depending on the speed and memory of your computer, this may also be a factor in this case; others may not notice the degradation).

GeneralRe: c# file I/O looking strange in task manager Pin
Dan Wulff2-Apr-15 10:34
Dan Wulff2-Apr-15 10:34 
QuestionCreate a Developper Pin
Member 83675021-Apr-15 10:42
Member 83675021-Apr-15 10:42 
AnswerRe: Create a Developper Pin
Dave Kreskowiak1-Apr-15 10:57
mveDave Kreskowiak1-Apr-15 10:57 
GeneralRe: Create a Developper Pin
Member 83675021-Apr-15 11:26
Member 83675021-Apr-15 11:26 
GeneralRe: Create a Developper Pin
PIEBALDconsult1-Apr-15 11:00
mvePIEBALDconsult1-Apr-15 11:00 
QuestionImplementing signalR Asynchronous calls for web service calls with 2 minutes timeout Pin
Member 105259811-Apr-15 8:29
professionalMember 105259811-Apr-15 8:29 
AnswerRe: Implementing signalR Asynchronous calls for web service calls with 2 minutes timeout Pin
Pete O'Hanlon1-Apr-15 9:43
mvePete O'Hanlon1-Apr-15 9:43 
QuestionWindows 7 C# and biometric API Pin
jerome.dimitri.fortias@gmail.com1-Apr-15 2:57
jerome.dimitri.fortias@gmail.com1-Apr-15 2:57 
AnswerRe: Windows 7 C# and biometric API Pin
Pete O'Hanlon1-Apr-15 3:34
mvePete O'Hanlon1-Apr-15 3:34 
GeneralRe: Windows 7 C# and biometric API Pin
jerome.dimitri.fortias@gmail.com1-Apr-15 3:42
jerome.dimitri.fortias@gmail.com1-Apr-15 3:42 
AnswerRe: Windows 7 C# and biometric API Pin
Manfred Rudolf Bihy1-Apr-15 3:58
professionalManfred Rudolf Bihy1-Apr-15 3:58 
GeneralRe: Windows 7 C# and biometric API Pin
jerome.dimitri.fortias@gmail.com1-Apr-15 3:59
jerome.dimitri.fortias@gmail.com1-Apr-15 3:59 
GeneralRe: Windows 7 C# and biometric API Pin
Manfred Rudolf Bihy1-Apr-15 22:38
professionalManfred Rudolf Bihy1-Apr-15 22:38 
AnswerRe: Windows 7 C# and biometric API Pin
Eddy Vluggen1-Apr-15 9:34
professionalEddy Vluggen1-Apr-15 9:34 
QuestionHow to compile Aforge.Video.FFMpeg.dll with C# on .NET4.5 Pin
Amatuer Developer1-Apr-15 0:23
Amatuer Developer1-Apr-15 0:23 
AnswerRe: How to compile Aforge.Video.FFMpeg.dll with C# on .NET4.5 Pin
Pete O'Hanlon1-Apr-15 3:37
mvePete O'Hanlon1-Apr-15 3:37 
GeneralRe: How to compile Aforge.Video.FFMpeg.dll with C# on .NET4.5 Pin
Amatuer Developer1-Apr-15 4:40
Amatuer Developer1-Apr-15 4:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.