-
Notifications
You must be signed in to change notification settings - Fork 227
Description
Hi, we are working hard to port our existing WF application to .NET 6. And we found some performance degradation and I have some local changes to fix, but of course they are not perfect as I am not an compiler expert..
Basically our test result for one xaml file degrades from 0.5s to 18s on first Invoke(), and 0.7s to 1.5s on later 1000 Invoke() calls.
Issue 1:
For every expression compilation, all those meta data resolver will be run again and again, leading to a lot of file access.
https://github.com/dotnet/roslyn/blob/e6817547af8b16994e31ae959ec28e4cb4922020/src/Scripting/Core/Hosting/Resolvers/RuntimeMetadataReferenceResolver.cs#L200
Issue 2:
And it seems WfEventSource is always enabled, thus even when profiler is not attached, those tracing code are taking much time while executing the workflow, comparing to .NET framework profiling results.
See my local commit for what I have changed. Running all unit tests in VS has passed after this change.
https://github.com/UiPath/CoreWF/compare/develop...angelowang:CoreWF:develop?expand=1