c# - Fastest way to store an ascii file's text in a RichTextBox? -


I have some ascii files that are 60-100 MB in size, I can control one of them in the view c # I want to store as soon as possible. I have been googling for the answer and I have got some solutions like adding a file to the stringbilder and then converting it into string and storing it in the RTB, the solution I have experienced is using a feature stream so far And it is txt_log.LoadFile (FI, Rich TextBoostream TypePlanText). This is the fastest implementation yet, but better implementation should be present. Am I ignoring something? Is there any way to create files directly from RTB dynamically?

If it helps, then I'm planning to do searches after reading it through the file.

I have to do this in a simple way:
myRtb.Text = File.ReadAllText (BigFile.txt, Encoding.ASCIIEncoding);
But it is doubtful that you can get good performance with this big file like this.


Comments