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, CodeLens Team Indicators – Processing Pipeline,  I had described the command line utility that could be used to administer CodeLens jobs.

 

Problem Statement

Several customers have a few code files (in most cases tool-generated) which have a large number of code elements and are changed frequently. The CodeLens files for such files will be very large. Processing these files takes time and thus increases the duration of CodeLens jobs. In addition, Processing these files are CPU intensive too.  Since developers don’t look at these files at all (they look at the original file from which these are generated), it is acceptable to ignore them from CodeLens processing.  We received requests from these customers to allow them to list these large files and ignore them from CodeLens processing.

 

New Feature – List Large Files

In Visual Studio 2013 Update 3, we have enhanced the command line utility (described in this MSDN article - CodeIndex Command), to list large files.

 

TfsConfig codeIndex /listLargeFiles [/fileCount:<FileCount>]  [/minSize:<MinSize>] /collectionName:<CollectionName> | /collectionId:<CollectionId>]

Display large Files.

EXAMPLE

TfsConfig codeIndex /listLargeFiles /fileCount:50 /minSize:10 /collectionName:<CollectionName>

Display 50 files that are larger than 10 KB.

(Note that the CodeLens files are compressed and the file size shown here is after compression).

After getting the list of large files, TFS administrators can add them to ignored list using TFSConfig CodeIndex /ignoreList:add.

Summary

In this blog post, I talked about a new feature to list large files that can be used by Team Foundation Server administrators to enable them to optimize CodeLens job processing. As always, looking forward to your feedback and questions on this topic and CodeLens in general.