WPF, UWP, and Silverlight v2018.1 Maintenance Releases

by Avatar Bill Henning (Actipro)
Wednesday, October 17, 2018 at 12:22pm

SyntaxEditor vNext Performance Tuning and Printing

by Avatar Bill Henning (Actipro) - 2 comments
Monday, October 15, 2018 at 4:48pm

BlogPostBanner-SyntaxEditor-DevNotes

As mentioned in a previous post, we have been working on refactoring the core internal implementation of our SyntaxEditor code editor control on the WPF, UWP, and WinForms platforms.  This effort (codenamed vNext) is being made to bring all three platforms onto the same codebase for easier updating moving forward, and to enhance features wherever possible.

For the last three weeks or so of SyntaxEditor vNext development, we've been working on performance profiling and printing support.

Performance Profiling

As part of vNext, we are doing our best to speed up the editor even more than before. 

The Universal Windows version of SyntaxEditor is many times faster than the current UWP SyntaxEditor.  A large part of that is due to the newer way we measure and render the control in vNext, which is significantly faster than what we were able to do in the past.  Other tunings also help.  Let's examine some performance results.

Using page-down to scroll through a large document, we're seeing a 3.5x speed increase in the vNext UWP SyntaxEditor!  UWP SyntaxEditor speed increases when dragging the scrollbar thumb are even more evident.  There is a bit of a lag in the current UWP SyntaxEditor, whereas in the vNext UWP SyntaxEditor, the display is instant and tracks with the dragged thumb perfectly.

Running the same page-down scrolling test in WinForms, we're seeing a 20% improvement in speed over the older version.  The WPF version is seeing a slight improvement in scrolling speed over before as well, although it has always scrolled extremely fast.

We are continuing to work on tuning the API to maximize performance when scrolling and editing.

Printing

Printing support has been added back into vNext for the WPF and WinForms versions.  We are currently working on the UWP version's printing support.  These features allow you to easily print out a document to paper, or a PDF file using the "Microsoft Print to PDF" virtual printer found in Windows 10.

What's Next

We are going to wrap up UWP printing support next, and then will move onto a few other areas left to port over to the API.  Large remaining areas include searching and IntelliPrompt feature APIs.