CoreWF icon indicating copy to clipboard operation
CoreWF copied to clipboard

My findings about performance degradation

Open angelowang opened this issue 2 years ago • 2 comments

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

angelowang avatar Apr 20 '23 10:04 angelowang

https://github.com/UiPath/CoreWF/pull/212 Good to see this in the develop branch, for Issue 2.

angelowang avatar Apr 21 '23 05:04 angelowang

It sounds like we just need to publish a new version. Let me find out what's holding up our pipeline.

dmetzgar avatar Jul 31 '23 19:07 dmetzgar