Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
AnswerOk, I found the solution Pin
Muammar©16-Sep-07 1:59
Muammar©16-Sep-07 1:59 
Questioncontrol panel languages Pin
md_refay15-Sep-07 23:39
md_refay15-Sep-07 23:39 
QuestionSlow binary reader Pin
Xmen Real 15-Sep-07 23:30
professional Xmen Real 15-Sep-07 23:30 
AnswerRe: Slow binary reader [modified] Pin
User 665816-Sep-07 1:02
User 665816-Sep-07 1:02 
GeneralRe: Slow binary reader Pin
Xmen Real 16-Sep-07 4:34
professional Xmen Real 16-Sep-07 4:34 
GeneralRe: Slow binary reader Pin
Dave Kreskowiak16-Sep-07 5:56
mveDave Kreskowiak16-Sep-07 5:56 
GeneralRe: Slow binary reader [modified] Pin
Xmen Real 16-Sep-07 7:05
professional Xmen Real 16-Sep-07 7:05 
AnswerRe: Slow binary reader Pin
Guffa16-Sep-07 1:50
Guffa16-Sep-07 1:50 
xmen_xwk wrote:
filename += br.ReadChar();


That's equivalent to:

object temp1 = (object)br.ReadChar();
string temp2 = fileName.ToString() + temp1.ToString();
fileName = temp2;

That means that you create three new objects for every single character that you read. If the filenames are 20 characters by average, that comes to 420000 objects for reading 7000 files.

Use the ReadChars method to read several characters from the stream.

xmen_xwk wrote:
filename.Remove(filename.Length - 3);


That doesn't accomplish anything. The Remove method returns the new string, so you have to take care of the return value, just as you do with the Replace and Trim methods.

---
single minded; short sighted; long gone;

GeneralRe: Slow binary reader Pin
Xmen Real 16-Sep-07 4:32
professional Xmen Real 16-Sep-07 4:32 
GeneralRe: Slow binary reader Pin
Dave Kreskowiak16-Sep-07 5:58
mveDave Kreskowiak16-Sep-07 5:58 
GeneralRe: Slow binary reader Pin
Guffa16-Sep-07 6:04
Guffa16-Sep-07 6:04 
GeneralRe: Slow binary reader Pin
Xmen Real 16-Sep-07 7:24
professional Xmen Real 16-Sep-07 7:24 
GeneralRe: Slow binary reader Pin
Insincere Dave16-Sep-07 8:11
Insincere Dave16-Sep-07 8:11 
GeneralRe: Slow binary reader Pin
Xmen Real 16-Sep-07 18:08
professional Xmen Real 16-Sep-07 18:08 
QuestionNetwork programing Pin
ali_reza_zareian15-Sep-07 22:54
ali_reza_zareian15-Sep-07 22:54 
AnswerRe: Network programing Pin
Muammar©16-Sep-07 0:48
Muammar©16-Sep-07 0:48 
AnswerRe: Network programing Pin
Dave Kreskowiak16-Sep-07 2:10
mveDave Kreskowiak16-Sep-07 2:10 
Questioncontrol graphics capture Pin
quaso115-Sep-07 22:50
quaso115-Sep-07 22:50 
AnswerRe: control graphics capture Pin
Dave Kreskowiak16-Sep-07 7:05
mveDave Kreskowiak16-Sep-07 7:05 
GeneralRe: control graphics capture Pin
quaso116-Sep-07 7:08
quaso116-Sep-07 7:08 
GeneralRe: control graphics capture Pin
Dave Kreskowiak16-Sep-07 8:59
mveDave Kreskowiak16-Sep-07 8:59 
QuestionGet CPU Temperature Pin
Johan Martensson15-Sep-07 22:10
Johan Martensson15-Sep-07 22:10 
AnswerRe: Get CPU Temperature Pin
Giorgi Dalakishvili15-Sep-07 23:04
mentorGiorgi Dalakishvili15-Sep-07 23:04 
AnswerRe: Get CPU Temperature Pin
Dave Kreskowiak16-Sep-07 7:02
mveDave Kreskowiak16-Sep-07 7:02 
AnswerRe: Get CPU Temperature Pin
Urs Enzler16-Sep-07 20:56
Urs Enzler16-Sep-07 20:56 

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.