I have a .NET 10.0 Godot 4.5 project which is hit very hard by the ActionRegistrationSourceGenerator. It adds nearly 10 seconds to build times in my somewhat sizeable project.
I've done some tests with Stopwatch and found this part in ActionRegistrationSourceGenerator.cs seems to be the culprit:
var actions = new List<YarnAction>();
foreach (var tree in compilation.SyntaxTrees)
{
actions.AddRange(Analyser.GetActions(compilation, tree, output).Where(a => a.DeclarationType == DeclarationType.Attribute));
}
As is, the performance impact of this generator is a bit of a deal breaker for using this addon personally.
Perhaps the ActionRegistrationSourceGenerator could be replaced with an incremental source generator without the file IO and Directory usage?
I have a .NET 10.0 Godot 4.5 project which is hit very hard by the ActionRegistrationSourceGenerator. It adds nearly 10 seconds to build times in my somewhat sizeable project.
I've done some tests with Stopwatch and found this part in ActionRegistrationSourceGenerator.cs seems to be the culprit:
As is, the performance impact of this generator is a bit of a deal breaker for using this addon personally.
Perhaps the ActionRegistrationSourceGenerator could be replaced with an incremental source generator without the file IO and Directory usage?