-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply BindingRedirects much faster #414
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,10 +79,8 @@ let private applyBindingRedirects bindingRedirects (configFilePath:string) = | |
|
||
/// Applies a set of binding redirects to all .config files in a specific folder. | ||
let applyBindingRedirectsToFolder rootPath bindingRedirects = | ||
let getFiles searchPattern = Directory.GetFiles(rootPath, searchPattern, SearchOption.AllDirectories) |> List.ofArray | ||
|
||
getFiles "web.config" @ | ||
getFiles "app.config" | ||
Directory.GetFiles(rootPath, "*.config", SearchOption.AllDirectories) | ||
|> Seq.filter (fun x -> x.EndsWith "web.config" || x.EndsWith "app.config") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but It's the full path, right? Should be somethin like endwith DirectorySeparator + filename |
||
|> Seq.iter (applyBindingRedirects bindingRedirects) | ||
|
||
/// Calculates the short form of the public key token for use with binding redirects, if it exists. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried
EnumerateFiles
instead ofGetFiles
? Could get more speed improvement.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not this time. The perf-improvement comes from the fact that we only scan once.