Click here to Skip to main content
15,905,322 members
Home / Discussions / C#
   

C#

 
GeneralRe: text resize in my web page Pin
EliottA9-Jan-09 6:08
EliottA9-Jan-09 6:08 
QuestionRe: text resize in my web page Pin
Eddy Vluggen9-Jan-09 8:45
professionalEddy Vluggen9-Jan-09 8:45 
QuestionLocalization and Combo Boxes Pin
belzer9-Jan-09 4:42
belzer9-Jan-09 4:42 
AnswerRe: Localization and Combo Boxes Pin
Colin Angus Mackay9-Jan-09 7:49
Colin Angus Mackay9-Jan-09 7:49 
Questiontoolbox of buttons Pin
abu rakan9-Jan-09 3:58
abu rakan9-Jan-09 3:58 
AnswerRe: toolbox of buttons Pin
User 66589-Jan-09 4:42
User 66589-Jan-09 4:42 
QuestionCrystal reports, Dynamic parameter values not showing up , Static works fine Pin
c0ax_lx9-Jan-09 3:37
c0ax_lx9-Jan-09 3:37 
QuestionHelp Required in Schedular Class Design Pin
Aman Bhullar9-Jan-09 2:11
Aman Bhullar9-Jan-09 2:11 
AnswerRe: Help Required in Schedular Class Design Pin
J4amieC9-Jan-09 2:57
J4amieC9-Jan-09 2:57 
GeneralRe: Help Required in Schedular Class Design Pin
Luc Pattyn9-Jan-09 3:31
sitebuilderLuc Pattyn9-Jan-09 3:31 
AnswerRe: Help Required in Schedular Class Design Pin
Eddy Vluggen9-Jan-09 8:49
professionalEddy Vluggen9-Jan-09 8:49 
QuestionGetting the GMT time Pin
tauras819-Jan-09 2:08
tauras819-Jan-09 2:08 
AnswerRe: Getting the GMT time Pin
User 66589-Jan-09 2:15
User 66589-Jan-09 2:15 
GeneralRe: Getting the GMT time Pin
tauras819-Jan-09 2:18
tauras819-Jan-09 2:18 
GeneralRe: Getting the GMT time Pin
Luc Pattyn9-Jan-09 2:19
sitebuilderLuc Pattyn9-Jan-09 2:19 
GeneralRe: Getting the GMT time Pin
tauras819-Jan-09 2:28
tauras819-Jan-09 2:28 
GeneralRe: Getting the GMT time Pin
Luc Pattyn9-Jan-09 2:35
sitebuilderLuc Pattyn9-Jan-09 2:35 
GeneralRe: Getting the GMT time Pin
User 66589-Jan-09 2:37
User 66589-Jan-09 2:37 
GeneralRe: Getting the GMT time Pin
Eddy Vluggen9-Jan-09 8:51
professionalEddy Vluggen9-Jan-09 8:51 
Question"Windows has triggered a breakpoint" error. Pin
Benny_Lava9-Jan-09 1:29
Benny_Lava9-Jan-09 1:29 
AnswerRe: "Windows has triggered a breakpoint" error. Pin
c0ax_lx9-Jan-09 3:55
c0ax_lx9-Jan-09 3:55 
QuestionReading Large Files Pin
MumbleB9-Jan-09 1:19
MumbleB9-Jan-09 1:19 
Hi Guys. I have now searched the Web and can't seem to find the exact solution for my problem. I am trying to process a file of just over 2gb in size. File contains 879 987 lines of data.

I am using the FileHelpers library to read the file, search for specific values and then writing other data from the file out to a new file.

MY problem is that It takes a few hours to read the file and I have to abort the job. Is there a better way of doing this? I have resorted to writing a splitter to split the file into smaller chunks and then processing the smaller 20+ files which is much faster but also takes a bit of time to do.

Can anybody please advise of a better or faster way of reading the one big file and doing what I am doing below??

string filePath;
filePath = txtBoxSelectFile.Text;


FileHelperEngine<IvalueRev> engine = new FileHelperEngine<IvalueRev>();

engine.ErrorManager.ErrorMode = ErrorMode.SaveAndContinue;

IvalueRev[] res = engine.ReadFile(filePath);

if (engine.ErrorManager.ErrorCount > 0)
    engine.ErrorManager.SaveErrors(@"C:\Errors.txt");
StreamWriter sw = new StreamWriter(filePath + ".txt");
foreach (IvalueRev rev in res)
{
    if (rev.Flag == "2" || rev.Flag == "4" || rev.Flag == "5" || rev.Flag == "6" || rev.Flag == "7" || rev.Flag == "8" || rev.Flag == "9")
    {
        sw.WriteLine(rev.HID.ToString() + "\t" + rev.Flag.ToString());
    }
}

sw.Close();


Excellence is doing ordinary things extraordinarily well.

GeneralRe: Reading Large Files Pin
Luc Pattyn9-Jan-09 2:27
sitebuilderLuc Pattyn9-Jan-09 2:27 
GeneralRe: Reading Large Files Pin
MumbleB9-Jan-09 2:40
MumbleB9-Jan-09 2:40 
GeneralRe: Reading Large Files Pin
Luc Pattyn9-Jan-09 3:09
sitebuilderLuc Pattyn9-Jan-09 3:09 

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.