This question is locked. New answers and comments are not allowed.
So I have a RadRichTextBox that I am using. There are log files in which I want to import into the control:
Problem #1: I have some log files that exceed 1MB in size, and I find the larger the log file, the longer it takes to load the control.
And I also want to implement a search mechanism with word highlighting:
Problem #2: So let's assume the RadDocument contains many results with the word "the" as a search term. The bigger the file, the longer it takes for the DocumentTextSearch to parse through it all.
So here are my questions:
1. Is there any way to optimize the loading of larger text files into the RadRichTextBox control?
2. Is there a way for DocumentTextSearch to retrieve these results in a more optimal way?
RadDocument doc = new RadDocument();doc = ImportText(dvm.LogText); //<-- this is a string, from TxtFormatProviderlogViewer.Document = doc;Problem #1: I have some log files that exceed 1MB in size, and I find the larger the log file, the longer it takes to load the control.
And I also want to implement a search mechanism with word highlighting:
private void SelectAllMatches(string toSearch) { this.logViewer.Document.Selection.Clear(); DocumentTextSearch search = new DocumentTextSearch(this.logViewer.Document); foreach (var textrange in search.FindAll(toSearch)) { this.logViewer.Document.Selection.AddSelectionStart(textrange.StartPosition); this.logViewer.Document.Selection.AddSelectionEnd(textrange.EndPosition); } }Problem #2: So let's assume the RadDocument contains many results with the word "the" as a search term. The bigger the file, the longer it takes for the DocumentTextSearch to parse through it all.
So here are my questions:
1. Is there any way to optimize the loading of larger text files into the RadRichTextBox control?
2. Is there a way for DocumentTextSearch to retrieve these results in a more optimal way?
