本文介绍了使用richtextbox.loadfile方法加载大型* .rtf文件时的性能问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I want to display a large *.txt file to RichTextBox. The size is about 7MB. When I use RichTextBox.LoadFile() method, it takes a long time(about 2 minutes) util it shown up. But if I use wordpad or any other free editors, it displayed very soon. How can I improve the performance? Please give me some advice. The code is: RichTextBox1.LoadFile(FilePath, RichTextBoxStreamType.RichText);
我尝试了什么: i尝试使用内存流加载,但它仍然非常慢
What I have tried: i tried use memorystream to load,but it still very slow
推荐答案你完全一字一句地复制了这个问题。我建议你查看你复制它的答案的答案。 使用时的性能问题RichTextBox.LoadFile方法加载大型* .rtf文件。 [ ^ ] 其他链接: c# - 将文本文件加载到RichTextBox的最快方法是什么? - 堆栈溢出 [ ^ ] richtextbox.loadfile slow c - Google搜索 [ ^ ] You copied this question exactly, word for word. I suggest you look at the responses from where you copied it for your answer. Performance issue when using RichTextBox.LoadFile method to load a large *.rtf file.[^] Other links: c# - What is the fastest way to load text file into RichTextBox? - Stack Overflow[^] richtextbox.loadfile slow c - Google Search[^]
更多推荐
使用richtextbox.loadfile方法加载大型* .rtf文件时的性能问题。
发布评论