Click here to Skip to main content
16,014,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDrawing ( CView ) Pin
netx20037-Mar-03 10:27
netx20037-Mar-03 10:27 
GeneralRe: Drawing ( CView ) Pin
Chris Losinger7-Mar-03 10:56
professionalChris Losinger7-Mar-03 10:56 
GeneralMiddle button clicked Pin
orcun colak7-Mar-03 10:00
orcun colak7-Mar-03 10:00 
GeneralRe: Middle button clicked Pin
RobJones7-Mar-03 10:31
RobJones7-Mar-03 10:31 
QuestionHow to search a large text file quicker Pin
dazinith7-Mar-03 9:51
dazinith7-Mar-03 9:51 
AnswerRe: How to search a large text file quicker Pin
Christian Graus7-Mar-03 10:04
protectorChristian Graus7-Mar-03 10:04 
GeneralRe: How to search a large text file quicker Pin
dazinith7-Mar-03 10:10
dazinith7-Mar-03 10:10 
GeneralRe: How to search a large text file quicker Pin
Neville Franks7-Mar-03 10:22
Neville Franks7-Mar-03 10:22 
I don't understand why this is taking so long. I'd get rid of the progress bar updates. Also see if you can increase the size of the buffer ifstream uses. Why do you need to copy the string into a CString. Just use strchr() on szBuffer2.

As others have said Memory Mapped Files are great for this, but using streams should also be more than fast enough. There is something or several things fundamentally wrong with your implementation.

Also look at profiling the code, which will show you where the bottlenecks are. Look at Glowcode www.glowcode.com[^]

In ED (see sig) loading a 30K line is instantaneous. As is finding something at the end of such a file.

Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
AnswerRe: How to search a large text file quicker Pin
Scott H. Settlemier7-Mar-03 10:14
Scott H. Settlemier7-Mar-03 10:14 
GeneralRe: How to search a large text file quicker Pin
dazinith7-Mar-03 10:23
dazinith7-Mar-03 10:23 
GeneralRe: How to search a large text file quicker Pin
Scott H. Settlemier7-Mar-03 11:21
Scott H. Settlemier7-Mar-03 11:21 
AnswerRe: How to search a large text file quicker Pin
Tim Smith7-Mar-03 10:25
Tim Smith7-Mar-03 10:25 
GeneralRe: How to search a large text file quicker Pin
dazinith7-Mar-03 11:00
dazinith7-Mar-03 11:00 
GeneralRe: How to search a large text file quicker Pin
Tim Smith7-Mar-03 11:44
Tim Smith7-Mar-03 11:44 
AnswerRe: How to search a large text file quicker Pin
Ted Ferenc8-Mar-03 2:02
Ted Ferenc8-Mar-03 2:02 
GeneralDShow-implementing CBaseControlWindow Pin
Jakub Misek7-Mar-03 9:36
Jakub Misek7-Mar-03 9:36 
QuestionCompliers and File IO buffer efficiency? Pin
phyzics7-Mar-03 9:12
phyzics7-Mar-03 9:12 
AnswerRe: Compliers and File IO buffer efficiency? Pin
Tim Smith7-Mar-03 9:22
Tim Smith7-Mar-03 9:22 
GeneralHelp With Threads...PLEASE! Pin
dantan987-Mar-03 7:57
dantan987-Mar-03 7:57 
GeneralRe: Help With Threads...PLEASE! Pin
dantan987-Mar-03 7:59
dantan987-Mar-03 7:59 
GeneralRe: Help With Threads...PLEASE! Pin
AlexO7-Mar-03 8:16
AlexO7-Mar-03 8:16 
GeneralRe: Help With Threads...PLEASE! Pin
dantan987-Mar-03 8:34
dantan987-Mar-03 8:34 
GeneralRe: Help With Threads...PLEASE! Pin
AlexO7-Mar-03 9:28
AlexO7-Mar-03 9:28 
GeneralRe: Help With Threads...PLEASE! Pin
Scott H. Settlemier7-Mar-03 9:59
Scott H. Settlemier7-Mar-03 9:59 
GeneralRe: Help With Threads...PLEASE! Pin
Neville Franks7-Mar-03 10:26
Neville Franks7-Mar-03 10:26 

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.