Giter Site home page Giter Site logo

Compilation peformance about buildalyzer HOT 7 CLOSED

phmonte avatar phmonte commented on May 20, 2024
Compilation peformance

from buildalyzer.

Comments (7)

daveaglick avatar daveaglick commented on May 20, 2024

You might be hitting the deep nested path globbing problem (there's an issue or 3 on it somewhere). In a nutshell, the SDK isn't very good at resolving globbing patterns when there is a large nested path structure like node_modules. Any chance this applies? What's the target project look like?

from buildalyzer.

daveaglick avatar daveaglick commented on May 20, 2024

Also - curious how long the target project takes to build if you run MSBuild on it from the command line? If there's a big variance between that and Buildalyzer then we might need to investigate missing properties or something...

from buildalyzer.

josephwoodward avatar josephwoodward commented on May 20, 2024

This is the .csproj file in question:

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <UserSecretsId>aspnet-graphiql.example-D0705FC5-6A16-43BB-AE45-3C609BE0FE6A</UserSecretsId>
  </PropertyGroup>
  <ItemGroup>
    <Folder Include="wwwroot\" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="GraphQL" Version="0.17.3" />
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\graphiql\graphiql.csproj" />
  </ItemGroup>
</Project>

Running dotnet build on the project takes 8 - 9 seconds:

Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  graphiql -> /Users/josephwoodward/Dev/graphiql-dotnet/src/graphiql/bin/Debug/netstandard2.0/GraphiQL.dll
  graphiql.example -> /Users/josephwoodward/Dev/graphiql-dotnet/src/graphiql.example/bin/Debug/netcoreapp2.0/graphiql.example.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:08.50

from buildalyzer.

josephwoodward avatar josephwoodward commented on May 20, 2024

I'll try a few other projects to see if it's limited to that one.

from buildalyzer.

daveaglick avatar daveaglick commented on May 20, 2024

That 40 second warm up certainly seems excessive. Anything stick out at you if you pass in a StringWriter to the manager ctor and bump the verbosity? I'll try to replicate tomorrow - I haven't used it against a .NET Core console app or an ASP.NET Core app yet, so maybe something about either of those. Might also be the NuGet tasks acting up given how large the dependency graph is on the ASP.NET Core metapackage.

from buildalyzer.

josephwoodward avatar josephwoodward commented on May 20, 2024

Interesting, a simple console application (dotnet new console) takes no time at all (1.3 seconds) and a new Web API (dotnet new webapi) takes 5 seconds, so it must be something about that project.

from buildalyzer.

daveaglick avatar daveaglick commented on May 20, 2024

I'm going to go ahead and close this for now. To a large extent we're at the mercy of MSBuild - it'll take as long as it takes, particularly since Buildalyzer now runs the Restore target by default. That said, I would hope design-time builds like this don't ever take too long. I'll try to keep an eye on build times, particularly in the integration tests, to see if there's any odd outliers.

from buildalyzer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.