Skip to content

Performance: reduce overhead of computing full path for items from globs #2645

Open
@lifengl

Description

@lifengl

Based on investigating performance trace to load Roslyn.sln, I looked into the time spent in CPS's UpdateSnapshotCoreAsync, almost 30% thread time in this function is to calculate FullPath of project items.

Because those items are coming from globs, I wonder the path is naturally normalized, and we can reduce some of the overhead here.

Name                                                                 	                                        Inc %	  Inc	           Inc Ct
microsoft.build.ni!FileUtilities.GetFullPath                        	                       28.1	          405.567	  592
+ microsoft.build.ni!FileUtilities.NormalizePath                     	                       19.3	           277.811	  267
+ system.ni!System.Text.RegularExpressions.Regex.Match(System.String)	 5.9	           84.554	  209
+ mscorlib.ni!System.IO.Path.Combine(System.String, System.String)   	 1.5	           22.189	   62

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: PerformanceCPSIssues impacting CPSPriority:1Work that is critical for the release, but we could probably ship without

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions