GithubHelp home page GithubHelp logo

Comments (8)

hybridherbst avatar hybridherbst commented on June 14, 2024 1

Added the ability to zoom in 1.8.0, available now :)
Let me know what you think / if something isn't working for you!

from compilation-visualizer.

hybridherbst avatar hybridherbst commented on June 14, 2024

The ~200 seconds until anything happens look wrong, does this look the same when you press "Recompile" here?

from compilation-visualizer.

KuraiAndras avatar KuraiAndras commented on June 14, 2024

Yes it does. I am trying to pinpoint why our compilation times are so long (~30-40 seconds when changing something trivial in a C# file)

from compilation-visualizer.

hybridherbst avatar hybridherbst commented on June 14, 2024

Could you let me know a few more things please:

  • Unity version
  • Comp Viz version
  • the manifest.json (redacted if need be)

from compilation-visualizer.

KuraiAndras avatar KuraiAndras commented on June 14, 2024
  • Unity 2021.2.8
  • CompilationVisualizer 1.7.0
manifest
{
  "dependencies": {
    "com.autsoft.unityresourcegenerator": "1.0.1",
    "com.cysharp.unitask": "2.2.5",
    "com.demigiant.dotween": "1.2.632",
    "com.injecter.hosting.unity": "6.1.2",
    "com.injecter.unity": "6.1.2",
    "com.mapbox.sdk": "file:../../Mapbox",
    "com.serilog.sinks.unity3d": "2.0.1",
    "com.unity.2d.sprite": "1.0.0",
    "com.unity.feature.development": "1.0.1",
    "com.unity.ide.rider": "3.0.10",
    "com.unity.ide.visualstudio": "2.0.14",
    "com.unity.ide.vscode": "1.2.4",
    "com.unity.test-framework": "1.1.30",
    "com.unity.textmeshpro": "3.0.6",
    "com.unity.timeline": "1.6.3",
    "com.unity.toolchain.win-x86_64-linux-x86_64": "1.0.0",
    "com.unity.ugui": "1.0.0",
    "org.nuget.injecter": "6.1.2",
    "org.nuget.microsoft.bcl.asyncinterfaces": "5.0.0",
    "org.nuget.microsoft.extensions.dependencymodel": "6.0.0",
    "org.nuget.microsoft.extensions.hosting": "6.0.0",
    "org.nuget.microsoft.extensions.http": "6.0.0",
    "org.nuget.microsoft.toolkit.mvvm": "7.1.2",
    "org.nuget.microsoft.unity.analyzers": "1.12.0",
    "org.nuget.morelinq": "3.3.2",
    "org.nuget.roslynator.analyzers": "4.0.0",
    "org.nuget.serilog": "2.10.0",
    "org.nuget.serilog.extensions.hosting": "4.2.0",
    "org.nuget.sonaranalyzer.csharp": "8.34.0-42011",
    "org.nuget.system.collections.immutable": "6.0.0",
    "com.unity.modules.ai": "1.0.0",
    "com.unity.modules.androidjni": "1.0.0",
    "com.unity.modules.animation": "1.0.0",
    "com.unity.modules.assetbundle": "1.0.0",
    "com.unity.modules.audio": "1.0.0",
    "com.unity.modules.cloth": "1.0.0",
    "com.unity.modules.director": "1.0.0",
    "com.unity.modules.imageconversion": "1.0.0",
    "com.unity.modules.imgui": "1.0.0",
    "com.unity.modules.jsonserialize": "1.0.0",
    "com.unity.modules.particlesystem": "1.0.0",
    "com.unity.modules.physics": "1.0.0",
    "com.unity.modules.physics2d": "1.0.0",
    "com.unity.modules.screencapture": "1.0.0",
    "com.unity.modules.terrain": "1.0.0",
    "com.unity.modules.terrainphysics": "1.0.0",
    "com.unity.modules.tilemap": "1.0.0",
    "com.unity.modules.ui": "1.0.0",
    "com.unity.modules.uielements": "1.0.0",
    "com.unity.modules.umbra": "1.0.0",
    "com.unity.modules.unityanalytics": "1.0.0",
    "com.unity.modules.unitywebrequest": "1.0.0",
    "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    "com.unity.modules.unitywebrequestaudio": "1.0.0",
    "com.unity.modules.unitywebrequesttexture": "1.0.0",
    "com.unity.modules.unitywebrequestwww": "1.0.0",
    "com.unity.modules.vehicles": "1.0.0",
    "com.unity.modules.video": "1.0.0",
    "com.unity.modules.vr": "1.0.0",
    "com.unity.modules.wind": "1.0.0",
    "com.unity.modules.xr": "1.0.0",
    "com.needle.compilation-visualizer": "1.7.0"
  },
  "scopedRegistries": [
    {
      "name": "Unity NuGet",
      "url": "https://unitynuget-registry.azurewebsites.net",
      "scopes": [
        "org.nuget"
      ]
    },
    {
      "name": "package.openupm.com",
      "url": "https://package.openupm.com",
      "scopes": [
        "com.autsoft.unityresourcegenerator",
        "com.cysharp.unitask",
        "com.demigiant.dotween",
        "com.injecter.hosting.unity",
        "com.injecter.unity",
        "com.needle.compilation-visualizer",
        "com.openupm",
        "com.serilog.sinks.unity3d"
      ]
    }
  ]
}

csc.rsp:

-nullable:enable
-nowarn:S3168
-nowarn:S3358
-nowarn:S1135

I am suspecting that the compilations are increased because of the roslyn anaylzers. Since they are resolved using xoofx's nuget server they are run against every asmdef (not just the ones present under the Assets folder). You can leave out the mapbox reference, we forked that and added assmebly definitions where they were applicable, otherwise it is identical to the reference version.

from compilation-visualizer.

KuraiAndras avatar KuraiAndras commented on June 14, 2024

@hybridherbst I have found the culprit. Disabling roslyn analyzers in unity reduces the compilation time significantly. When using visual studio and adding the analyzers through xoofx's unity nuget server the analyzers are picked up by visual studio so they are still useful, but the warnings are not displayed inside the unity console. The problem is that source generators will not work. Visual Studio will still see them, and generate the additional files, but unity will not pick them up in the compilation process.

from compilation-visualizer.

hybridherbst avatar hybridherbst commented on June 14, 2024

That's interesting to know @KuraiAndras, thanks for pointing that out. So they add a lot of time before compilation actually it seems, judging from the timeline? My understanding was that they run afterwards... (don't have much experience using them in Unity yet)

from compilation-visualizer.

KuraiAndras avatar KuraiAndras commented on June 14, 2024

Analyzers disabled:
image
Analyzers enabled:
image
both of these are after a couple of recompiles, just to make sure (and they consistently run at these speeds)
It seems that both the time before the actual compilation and the compilation times themselves increase when analyzers are disabled.

Analyzers in use:

  • Roslynator.Analyzers
  • SonarAnalyzer
  • Microsoft.Unity.Analyzer

Source Generator:

  • Microsoft.Toolkit.Mvvm

Unity:

  • 2021.2.14
  • .NET Standard profile

from compilation-visualizer.

Related Issues (13)

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.