android / android/tuningfork

AndroidPerformanceTuner_gen is slowing Unity Editor script compile times

Open
#36 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
62
Forks
33
PR merge metrics
No merged PRs in 30d

Description

I have my own Assembly for our C# scripts in Unity (asmdef) and so when I make a change to my source files, Unity should only have to rebuild my Assembly. However, in Unity 2022.3 LTS they added more compiler transparency, so you can see that it's compiling APT_gen's assembly as well, every time. This is because the APT code is writing to DevTuningfork.cs even though there's no change in the file, so Unity detects this and rebuilds the assembly. This causes a slowdown in workflow for programmers where the project contains the APT system. Please add code so that APT doesn't write DevTuningfork.cs when there's no changes detected, or better yet, don't run APT rebuilding code at all unless the source files it cares about are modified (e.g. ones with Enums).

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Unity 2022.3 LTS with a C# asmdef and inspect the APT rebuilding code that writes DevTuningfork.cs. Use Unity’s compiler transparency to compare builds when source files are unchanged; done means DevTuningfork.cs is not rewritten and APT_gen’s assembly is not needlessly recompiled.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
build-system, game-dev, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.