Currently the file viewer suffers from bad performance. Opening a large source file with much syntax highlighting takes up too much time ( several seconds ). In the current version the viewer uses a flow document to display the source code and syntax highlighting is performed in advance while creating the flow document.
I also tried to write a simple text viewer control based on FormattedText. However the performance is still bad. I made some measurements and it turns out that most of the time, is taken by configuring the FormattedText object (i.e. setting text color for different portions of text), measuring it and rendering it.
I currently have no idea, how to minimize the large delay caused by this, when opening a file. Any suggestions are welcome, so feel free to mail to my SourceForge e-mail alias.