Our latest release (v21.1) significantly improves startup performance for both our Word-inspired WPF Rich Text Editor and our Excel-inspired Spreadsheet components. Based on machine configuration and control settings, the changes we have introduced can shave off up to five seconds from startup time for applications that rely on our WPF Rich Text Editor and Spreadsheet controls.
These performance enhancements are due in large part to our new Ribbon API. This API allows you to declare deferred pages. Deferred pages display headers within the Ribbon panel, but do not load or initialize content until a user selects them. Both the DevExpress Rich Text Editor and Spreadsheet use the new API to declare built-in Ribbon elements.
Performance Benchmarks
For our internal tests, we used a sample app that opens a maximized window with the Rich Text Edit or Spreadsheet control (multiple times). We then measured the time it takes to render window content.
Note: The charts below include values for both “cold” and “hot” starts. A “cold” start represents the first time the test app opens a test window. During a “cold” start, the test window takes longer to render as assemblies need to initialize and the control needs to execute its initialization code. After a “cold” start, windows that use the Rich Text Edit or Spreadsheet control will not trigger initialization code again. As such, the opening of consecutive windows is considered a "hot" start.
WPF Rich Text Editor Test Summary: Our test system measured startup performance improvements of up to 200%.
WPF Spreadsheet Test Summary: Our test system measured startup performance improvements of up to 340%.
To test performance changes on your machine, feel free to download our test app using the following GitHub link: RichEdit and Spredsheet Controls Performance Comparison (v20.2 vs v21.1).
Don’t forget about JIT
JIT (just-in-time) compilation is an important part of every .NET app. The JIT compiler translates MSIL code in an assembly to native code for first time app use. The more code included in an assembly, the longer it takes to translate MSIL code to native code.
As you know, our Rich Text Editor and Spreadsheet controls are complex and sophisticated controls with a user interface that replicates MS Office (as well as built-in support for popular document formats and features). When you load the Spreadsheet or Rich Text Editor in your app for the first time, your machine will spend seconds to generate native code from MSIL code.
You can use multiple techniques to avoid JIT compilation and improve startup performance for apps that rely on our Rich Text Editor or Spreadsheet. The most effective of approach is Ngen.exe - available for the .NET Framework. Ngen.exe generates native code for .NET assemblies in advance and stores them on disk to avoid repetitive JIT processes. Take a look at the following article to learn more about Ngen.exe and other ways to reduce JIT overhead: Reducing Application Launch Time.
Your Feedback
Once you upgrade to v21.1, you should notice increased startup performance for both the Rich Text Editor and Spreadsheet controls. If you've already tested v21.1, feel free to provide feedback below or contact us via the Support Center. We appreciate your continued support.