Skip to content

My findings about performance degradation #256

@angelowang

Description

@angelowang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions