CodeLens is a heads-up display in your Visual Studio Editor where you can find information about your code in-context. See this MSDN article for an introduction to CodeLens – Get history and other info about your code.
In a previous blog post, I had described the CodeLens Team Indicators – Processing Pipeline. I recommend, you read that article before going further since I will be referring to the concepts introduced there.
In this blog post, I will describe some of the performance optimizations we have done for various jobs in the CodeLens processing pipeline as part of Team Foundation Server 2013 Update 3.
CodeLens jobs process each changeset to identify the information to be shown in CodeLens Team indicators. Each file in the changeset is processed to identify what has changed from the previous version. In Team Foundation Server 2013 Update 3, we have optimized the changeset processing specifically for branching and merging operations. Since these operations generally have a large number of files, these optimizations will significantly reduce the time spent in CodeLens processing.
Another optimization has been done in how temporary CodeLens data is managed. Previously the temporary CodeLens data for each file in a changeset was written to the database & Team Foundation Server File service one-by-one. Now we have implemented a batched writing of the temporary CodeLens data. This minimizes the database and file service operations and overall reduces processing time for CodeLens.
Indicative Perf Improvements based on our test data is shown below.
The first graph shows the reduction in time for the Keepup job when handling different types of changesets. On an average we are seeing >70% improvement in run time for these jobs.
The second graph shows the reduction in time for Aggregator job for these changesets. Here again, on an average we are seeing >70% performance improvement.
In this blog post, I talked about the performance optimizations that we have done in the CodeLens Team Indicators processing pipeline. As always, looking forward to your feedback and questions on this topic and CodeLens in general.