question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Investigating analyzer impact on build times

See original GitHub issue

StyleCop Classic used to write information about files it analyzed, including analysis results, in an XML cache called StyleCop.Cache, to speed the time it takes to analyze a project if some of the source code files are unchanged in the meantime. Although StyleCop Analyzers also has caches, they are limited to storing using aliases and copyright texts, but nothing like a results cache like StyleCop Classic used to have.

In my experience, running the StyleCop analyzer takes a considerable part of a project’s build time even if it ultimately finds few or no violations, and I feel that having a results cache (like StyleCop.Cache) will speed up this time because StyleCop would then focus analysis on only those files that have changed, which is often not many files.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:29 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
sharwellcommented, Jul 10, 2019

@peteroupc If the results from ReportAnalyzer don’t show in your output, you can add /bl:Build.binlog to your MSBuild command line as well. This will create an output file Build.binlog that you can open with the MSBuild Structured Log Viewer. This output format contains the information you would normally see with diagnostic level output, but is much faster than /v:d and the log viewer contains search functionality.

When you open the log in the viewer, you’ll want to search for the following:

"Total analyzer execution time"

Then you can click on a line on the left pane to get details.

image

1reaction
peteroupccommented, Jul 10, 2019

For one project of mine, the build time (msbuild /t:rebuild) was—

  • about 1:06 without StyleCop Analyzers, and
  • about 2:54 with StyleCop Analyzers,

resulting in almost triple the build time. This project used no other analyzers than StyleCop Analyzers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build performance analysis for speeding up Xcode builds
Speed up Xcode Build Performance by gaining insights using Build Timing Summary and various techniques that can save you a lot of time....
Read more >
Troubleshoot build performance with Build Analyzer
Build Analyzer provides a summary of time spent downloading dependencies and a detailed view of downloads per repository. To check the impact of...
Read more >
The Sonar guide for investigating the performance of .NET ...
This guide is intended to help SonarQube and SonarCloud users investigate .NET analysis performance issues. This effort can lead to:.
Read more >
Delay Analysis Methods: Examining the Impacted As-Planned ...
Generally speaking, performing an Impacted As-Planned analysis involves inserting a model of a known delay event or impact into the contractor's ...
Read more >
C++ build throughput investigation and tune up
If your build is MSBuild based, the first thing to do when investigating build performance is to see which projects and which tasks/targets ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found