Posted 17 years ago
by Matt Adamson
Guys,
I have a high spec pc e.g. core duo 6700 with 4GB ram and having performance issues using two SyntaxEditor controls loading C# code with only 3000 lines in.
I'm using AppendText to append one line at a time. Should I be setting some property before calling AppendText multiple time to improve performance e.g. perhaps the control is doing some intensive work every time text is appended. If this was performed at the end when all the text was added perhaps this would be quicker.
Just loading 3000 lines takes nearly 10 - 11 seconds which is extremely slow.
I also tried disable sematic and lexical parsing after reviewing the documentation section, specifically on handling large files i.e.
// TODO Performance optimisations trying out.
leftSyntaxEditor.Document.Outlining.Mode = OutliningMode.None;
leftSyntaxEditor.ContentDividersVisible = false;
leftSyntaxEditor.Document.LexicalParsingEnabled = false;
leftSyntaxEditor.WordWrap = WordWrapType.None;
leftSyntaxEditor.Document.SemanticParsingEnabled = false;
However this appeared to make no noticable difference.
Any thoughts on ways to improve this would be appreciated.
I have a high spec pc e.g. core duo 6700 with 4GB ram and having performance issues using two SyntaxEditor controls loading C# code with only 3000 lines in.
I'm using AppendText to append one line at a time. Should I be setting some property before calling AppendText multiple time to improve performance e.g. perhaps the control is doing some intensive work every time text is appended. If this was performed at the end when all the text was added perhaps this would be quicker.
Just loading 3000 lines takes nearly 10 - 11 seconds which is extremely slow.
I also tried disable sematic and lexical parsing after reviewing the documentation section, specifically on handling large files i.e.
// TODO Performance optimisations trying out.
leftSyntaxEditor.Document.Outlining.Mode = OutliningMode.None;
leftSyntaxEditor.ContentDividersVisible = false;
leftSyntaxEditor.Document.LexicalParsingEnabled = false;
leftSyntaxEditor.WordWrap = WordWrapType.None;
leftSyntaxEditor.Document.SemanticParsingEnabled = false;
However this appeared to make no noticable difference.
Any thoughts on ways to improve this would be appreciated.