使用richtextbox.loadfile方法加载大型* .rtf文件时的性能问题。

编程入门 行业动态 更新时间:2024-10-23 13:25:20
本文介绍了使用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文件时的性能问题。

本文发布于:2023-05-28 12:32:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/320977.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   性能   文件   方法   richtextbox

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!