Skip to content

Commit

Permalink
Merge pull request #2592 from Azure/developer/hamids/updateregexes
Browse files Browse the repository at this point in the history
Remove RegexOptions.Compiled for code paths executed during cold start
  • Loading branch information
safihamid authored Sep 30, 2020
2 parents b36006c + e6c470d commit ffb46ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Microsoft.Azure.WebJobs/FunctionNameAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public FunctionNameAttribute(string name)

/// <summary>
/// Validation for name.
/// RegexOptions.Compiled is specifically removed as it impacts the cold start.
/// </summary>
public static readonly Regex FunctionNameValidationRegex = new Regex(@"^[a-z][a-z0-9_\-]{0,127}$(?<!^host$)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public static readonly Regex FunctionNameValidationRegex = new Regex(@"^[a-z][a-z0-9_\-]{0,127}$(?<!^host$)", RegexOptions.IgnoreCase);
}
}

0 comments on commit ffb46ba

Please sign in to comment.