You could first display the first n characters that can be viewed in the user interface (assuming you have a scrollable text field). Then run a separate thread to asynchronously render sequential blocks.
Alternatively, you can combine it with your input stream from a file. Read the snippet and immediately add it to the text box. An example (not thorough, but you understand) ...
private void PopulateTextBoxWithFileContents(string path, TextBox textBox) { using (var fs = File.OpenRead(path)) { using (var sr = new StreamReader(fs)) { while (!sr.EndOfStream) textBox.Text += sr.ReadLine(); sr.Close(); } fs.Close(); } }
source share