Thanks to Ben Rampson for putting this post together.
In todayâ€™s article I will outline some of the significant new chart improvements that impact performance. In Office 2007 the graphics engine used by Office Charts was replaced with one that could support more complex rendering. A downside of this change was slower performance in certain scenarios relative to Office 2003. For example, supporting anti-aliasing in Office 2007 allows the chart to render smooth lines; however, the computation for smoothing takes multiple rendering passes which take additional time. One of the top priorities for Office 2010 was increasing chart performance. The examples below detail some of this work.
One of the primary areas of focus was improving the rendering speed of charts with large data sets. Many customers need to plot very large amounts of data to spot trends. The image below shows a sample scatter chart that has six series, each with ten thousand points. I sampled some timing measurements on this chart in multiple versions of Office. In Office 2003 this chart took 1.3 seconds to render. In Office 2007 the render was 14.7x slower than Office 2003, taking 19 seconds. In Office 2010 the resize action takes 1.8 seconds, 1.3x slower than Office 2003 but 10.5x faster than Office 2007.
In many cases Office 2010 not only provides fast performance, it addresses many blocking customer issues with Office 2007. I was recently working with a customer submitted file that plotted 120 thousand data points across four series of line and scatter chart types. In Office 2003 the chart took 2.7 seconds to render. In Office 2007 the chart wouldnâ€™t render after trying for 5 minutes. In Office 2010 the chart was drawn in 4.7 seconds.
A second performance area the charting team has focused on improving is text rendering. Almost all charts have some form of text present. This text takes calculation time for layout, often requiring multiple layout passes to determine the best appearance for the chart. For example, determining the appropriate text skip or rotation of an axis label to maximize legibility can be a costly operation as multiple possible arrangements need to be tried to determine the one that works best. One of the enhancements to Office 2010 was to improve the speed of overall text rendering and layout. Based on performance profiles in our testing lab, the improvements made to text rendering are currently knocking 10% to 20% off the total chart rendering time for the average chart.
In Office 2010 you will also notice that loading and saving files with charts is significantly faster than Office 2007. The charting team and the Excel team have both worked to tune the code to boost performance on load and save across the different Excel file formats. The chart below shows the results of some of the load and save tests run against a typical dashboard file with many charts. The load tests in Office 2010 are currently running 15-40% faster than Office 2007 while the save test are running 30-70% faster than Office 2007.
The charting team has also worked on increasing general chart performance for common chart and document interactions. Part of this work has been to reduce the unnecessary re-renders of a chart. When scrolling through a document with a chart or changing the selected element of a chart Office 2007 often recomputed and redrew the entire chart. Office 2010 eliminates these unnecessary calculations and instead reuses a cached image of the chart when possible. This change helps produce smoother document scrolling and near instantaneous chart element selection. The performance results of changing to a chart sheet on a customer file are shown in the chart below. The key aspect to note is that while Office 2010 is already similar in performance to Office 2003 on first render, subsequent renders of the chart are near instantaneous in Office 2010 when the chart has not changed.
In addition to the fixes mentioned above, the charting team has made many other improvements that impact performance. Performance remains a high priority for Office 2010 and we will continue to make further enhancements prior to release.