Re: Parsing large textfiles?
How are you parsing the file?
Re: Parsing large textfiles?
Quote:
Originally Posted by
billboy
How are you parsing the file?
Before I was just opening the file into a string then parsing the string and outputting it again. After some research I figured that I should try the same thing but line-by-line instead. It went a lot faster and didn't freeze, just trying to see if it worked properly or not.
Re: Parsing large textfiles?
Use stream reader, line by line should not freeze
Re: Parsing large textfiles?
This works for me, and I am reading text files that are hundreds of megabytes too.
vb.net Code:
Dim myFileReader As New StreamReader(ReadFilePath)
Dim myLine As String = ""
myLine = myFileReader.ReadLine()