Print preview performance

SyntaxEditor for Windows Forms Forum

Posted 17 years ago by Jared Phelps
Avatar
Hello-
I've noticed pretty slow performance when print previewing a document...It can take up to 2 minutes to bring up the screen for a 10-100 line document. I've noticed this in my own language and also in the sample project using either the C# language or one of the dynamic ones.

Also, I was wondering about the behavior of the PerformSemanticParse(Document document, TextRange parseTextRange, SemanticParseFlags flags) method. It seems like no matter what change to the document I make, the textrange parameter gives me the character's offset to Document.Length. Is it ever anything different?

Any ideas?

Thanks!
Jared

Comments (3)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We haven't seen any issues with previewing and haven't heard any other reports of problems. I just opened a 7000+ line document which loaded 165 pages for previewing in around 10 seconds. I'm wondering if it is something to do with your print driver. Have you been able to try it on another computer? Has anyone else seen this?

Also we are not seeing the problem with the parse range. If I put a breakpoint in the SimpleSyntaxLanguage in this method, I get small parseTextRanges when typing in the middle of the document:
public override void PerformSemanticParse(Document document, TextRange parseTextRange, SemanticParseFlags flags) {

If you are seeing something else then please let us know how to duplicate it in the sample project.


Actipro Software Support

Posted 17 years ago by Jared Phelps
Avatar
OK I tried print previewing on another computer and the performance was fine...I don't know what's wrong with my dev box...Other .NET applications with print preview seem to work fine, but I'll do some more testing and see what I can figure out.

I do see more meaningful behavior in the sample project...Can you give me some hints as to where this textrange parameter comes from so I can see what in my code is causing it? Is it based on semantic parse data, or is it purely lexical?

Thanks!
Jared
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sure, the PerformSemanticParse method is called from the Document class after PerformLexicalParse. It is passing in the TextRange that is returned from PerformLexicalParse, which should be the range of offsets that were parsed during the lexical parse operation.


Actipro Software Support

The latest build of this product (v24.1.0) was released 25 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.