views:

173

answers:

3

I have a requirement to create an application that will open up about 10 mb log files and highlight certain expressions.

I thought using WPF and richtextbox will work, but the richtextbox rending time is unacceptable.

Is there anything that has richtextbox like highlighting, but has better performance?

There any other way to accomplish this?

+1  A: 

Scintilla http://www.scintilla.org/ is used as a box for editing code. It provides highlighting for many different code syntax. You may be able to use it and specify the portions you need highlighted.

bnbeckwith
+1  A: 

If you do not need to allow the user to edit the logs you may be able to get away with using a TextBlock and wrap the sections to be highlighted in <Style> tags which accomplish the highlighting.

Rob Allen
A: 

How are you generating your Flowdocument - depending on what you are doing you may be able to speed it up. However, I too have run into these issues, especially because you have to generate the FlowDocument on the UI thread and if it takes too long you end up with a black screen.

Paul Betts