Skip to content

GetFileSpecInfoWithRegexObject allocates Regex #11872

@KirillOsenkov

Description

@KirillOsenkov

I noticed this allocates too much:

regexFileMatch = new Regex(matchFileExpression, DefaultRegexOptions);

Image

Let's investigate if we can cache these regexes, I suspect there's a very limited number of expressions here that we can reuse regexes for

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions