Skip to content

Faster "hot" restore - #3092

Merged
forki merged 2 commits into
fsprojects:masterfrom
vbfox:faster_restore
Feb 28, 2018
Merged

forki merged 2 commits into
fsprojects:masterfrom
vbfox:faster_restore

Conversation

@vbfox

@vbfox vbfox commented Feb 27, 2018

Copy link
Copy Markdown
Contributor

Remove two slow part from doing paket restore when a restore isn't needed

  • Setting ServicePointManager.SecurityProtocol is costly as it initialize a lot of .Net subsystems we don't otherwise use so I split the Utils module in two. As the network isn't used if everything is there the static constructor of NetUtils is never called.
  • Make filling supportMap with it's initial value lazy. It's costly and not used in such restores.

They are not needed on a simple restore but take time
This ensure that ServicePointManager.SecurityProtocol isn't set in cases
where the network doesn't need to be touched (It's pretty slow)

@matthid matthid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Utils.fs was kind of long anyway.

@forki

forki commented Feb 28, 2018 via email

Copy link
Copy Markdown
Member

@forki

forki commented Feb 28, 2018

Copy link
Copy Markdown
Member

ok test failure is unrelated. it's red on #3090 as well

@forki
forki merged commit a2e0c41 into fsprojects:master Feb 28, 2018
@forki

forki commented Feb 28, 2018

Copy link
Copy Markdown
Member

ok seems https://www.nuget.org/packages/Microsoft.Diagnostics.Tracing.EventSource.Redist/ released a package 7h ago. I will fix the test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants