About this article
This article explains Templafy's process for optimizing load time performance for the VSTO add-in.
- Technical Background
- Measuring Load Time Performance
- Gathering Feedback
- Load Time Performance Improvements
|
Technical Background
Templafy is continuously improving the load time performance of our VSTO add-ins and considers multiple key factors in that optimization process. First and foremost, Templafy minimizes the amount of code and resources that need to be loaded during the startup of our VSTO add-ins. This we achieve by carefully managing dependencies and reducing the size of resources that our add-ins rely on. Additionally, we are using asynchronous loading techniques to speed up the overall load time by only loading resources and code when they are needed and ensure that any initialization code runs as efficiently as possible.
Measuring Load Time Performance
Another key factor in understanding the performance of our VSTO add-ins is the measuring of load times. Templafy utilizes performance monitoring software and custom-made scripts to accurately measure the time it takes for our add-ins to load and execute the initialization. This tracing procedure is performed on a consistent basis and automatically after changes have been made to our code to ensure we do not have any performance bottlenecks. Additionally, Templafy works in close collaboration with the Microsoft App Assurance Program to further develop functionalities that improve the tracking of the impact of our add-ins regarding the Office applications load time.
PowerShell Script
If you believe the load time of your Templafy Add-in is taking longer than expected, please follow the steps below to share the average load time of the specified Office application with your Templafy representative.
- Download the Zip package that contains the script from the Templafy Blob storage
- Create a folder
c:\test\officeperf
- Copy the script
v4Measure-OfficePerf.ps1
to this location - Ensure the script is Unblocked
- Right click the script to open properties
- Select
Unblock
- Click
Apply
- Within the folder
c:\test\officeperf
create one test file calledtest
for whichever Office application you are testing - Start Windows PowerShell with the
Run as administrator
option - Enable running unsigned scripts by entering:
set-executionpolicy remotesigned
if you see the following error: - Start Windows PowerShell as a regular user
- Select the location of the script:
cd \test\officeperf
- Run the script with the executable depending on the Office applciation:
- Word:
.\v4Measure-OfficePerf.ps1 Word
- PowerPoint:
.\v4Measure-OfficePerf.ps1 PowerPoint
- Excel:
.\v4Measure-OfficePerf.ps1 Excel
- Word:
- After the script has completed the tests, it will show the average load time of the Office application in milliseconds.
DotTrace Snapshot
The DotTrace Snapshot might help to identify external factors that have an impact on the load time of the Templafy add-ins. Please note, due to the added overhead from the trace itself, the load times of the snapshot cannot be used as a general indicator for the load time. It only serves to identify potential causes. To install and run DotTrace, please follow the steps below and share the snapshot with your Templafy representative.
- Download the portable DotTrace 30 day free trial version from the Jet Brains website
- Execute the .exe file to install DotTrace
- Accept the License Information
- Select
Start Trial
which will open Edge to activate the license: - Select
Ok
- Switch back to Windows and start the MS Office application that should be assessed
- Switch back to DotTrace and select the WINWORD.exe from the running process list by selecting the green “plus button
- Select
Save
- Switch back to Windows and close the Office application
- Back in DotTrace ensure that WINWORD.EXE process is selected and the profiling type
Timeline
- Check
Collect profiling data from start
and click theStart
button - Once the Office application starts up and can be interacted with, please select “Get Snapshot and Wait”
- Wait until the new viewer is open
- Close the profiling process by selecting "Kill”
- Switch to the Dotrace viewer and save the snapshot
Gathering Feedback
Gathering customer feedback is a key factor as well when it comes to the optimization of our VSTO add-ins. To collect this feedback, we utilize our direct customer contacts such technical account managers, solution engineers and consultants but also analytic tools to track the user behavior and patterns. We encourage all our users to report any performance issues they may encounter and highly prioritize that feedback to ensure a positive user experience and customer satisfaction whilst keeping security at the forefront of our solutions. This feedback also enables us to understand how our add-ins perform in the real world and make data driven decisions on how to improve their performance in general.
Load Time Performance Improvements
The result of these ongoing improvements is that the new Hive platform is already faster than Templafy One, even though new and additional functionality has been added. As an example, the Hive VSTO add-in for Word is 3% faster than compared to the One add-in, and the Hive PowerPoint VSTO add-in is 26% faster than it's One counterpart.
Comments
0 comments
Article is closed for comments.