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

Use locked version as prefered version when resolver strategy is min #1141

Merged
merged 4 commits into from Oct 16, 2015

Conversation

Projects
None yet
2 participants
@mrinaldi
Contributor

mrinaldi commented Oct 15, 2015

This PR makes resolver faster by preferring the already locked version when the resolver strategy is min.

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Oct 15, 2015

Member

do you have a case which explains this?

Member

forki commented Oct 15, 2015

do you have a case which explains this?

@mrinaldi

This comment has been minimized.

Show comment
Hide comment
@mrinaldi

mrinaldi Oct 15, 2015

Contributor

I can't share the paket.dependencies and paket.lock I have here, but I have a small repro.

Of course this repro won't show the huge difference in resolve time, but I think you can get the picture.

Notice how many versions it tries before resolving to the same version it was already locked.
In my case, it tries hundreds of versions for each package (3 or 4 different packages with this behavior).

source https://nuget.org/api/v2

nuget WebApiContrib.Formatting.Jsonp !> 0
nuget WebApiContrib.Logging.Raygun
NUGET
  remote: https://nuget.org/api/v2
  specs:
    Microsoft.AspNet.WebApi.Client (5.1.1)
      Microsoft.Net.Http (>= 2.2.13) - framework: portable-wp80+win+net45
      Newtonsoft.Json (>= 4.5.11) - framework: portable-wp80+win+net45, >= net45
    Microsoft.AspNet.WebApi.Core (5.1.1)
      Microsoft.AspNet.WebApi.Client (>= 5.1.1)
    Microsoft.Bcl (1.1.7) - framework: portable-wp80+win+net45
      Microsoft.Bcl.Build (>= 1.0.10)
      Microsoft.Bcl.Build (>= 1.0.14)
    Microsoft.Bcl.Build (1.0.14) - import_targets: false, framework: portable-wp80+win+net45
    Microsoft.Net.Http (2.2.13) - framework: portable-wp80+win+net45
      Microsoft.Bcl (>= 1.1.3)
      Microsoft.Bcl.Build (>= 1.0.4)
    Newtonsoft.Json (4.5.11) - framework: portable-wp80+win+net45, >= net45
    WebApiContrib.Formatting.Jsonp (3.0.0)
      Microsoft.AspNet.WebApi.Core (>= 5.0.0)
    WebApiContrib.Logging.Raygun (0.9.14)
      Microsoft.AspNet.WebApi.Core (>= 5.1.1)

Just ran paket update

Before:

Resolving packages for group Main:
 - WebApiContrib.Formatting.Jsonp 3.0.2
 - Microsoft.AspNet.WebApi.Core 5.0.0
 - Microsoft.AspNet.WebApi.Client 5.0.0
 - Newtonsoft.Json 4.5.11
 - Microsoft.Net.Http 2.2.13
 - Microsoft.Bcl 1.1.7
 - Microsoft.Bcl.Build 1.0.14
 - WebApiContrib.Logging.Raygun 0.9.14
 - Microsoft.Bcl.Build 1.0.21
 - Microsoft.Bcl 1.1.8
 - Microsoft.Bcl 1.1.9
 - Microsoft.Bcl 1.1.10
 - Microsoft.Net.Http 2.2.15
 - Microsoft.Net.Http 2.2.18
 - Microsoft.Net.Http 2.2.19
 - Microsoft.Net.Http 2.2.20
 - Microsoft.Net.Http 2.2.22
 - Microsoft.Net.Http 2.2.28
 - Microsoft.Net.Http 2.2.29
 - Newtonsoft.Json 5.0.1
 - Newtonsoft.Json 5.0.2
 - Newtonsoft.Json 5.0.3
 - Newtonsoft.Json 5.0.4
 - Newtonsoft.Json 5.0.5
 - Newtonsoft.Json 5.0.6
 - Newtonsoft.Json 5.0.7
 - Newtonsoft.Json 5.0.8
 - Newtonsoft.Json 6.0.1
 - Newtonsoft.Json 6.0.2
 - Newtonsoft.Json 6.0.3
 - Newtonsoft.Json 6.0.4
 - Newtonsoft.Json 6.0.5
 - Newtonsoft.Json 6.0.6
 - Newtonsoft.Json 6.0.7
 - Newtonsoft.Json 6.0.8
 - Newtonsoft.Json 7.0.1
 - Microsoft.AspNet.WebApi.Client 5.1.0
 - Microsoft.AspNet.WebApi.Client 5.1.1
 - Microsoft.AspNet.WebApi.Client 5.1.2
 - Microsoft.AspNet.WebApi.Client 5.2.0
 - Microsoft.AspNet.WebApi.Client 5.2.2
 - Microsoft.AspNet.WebApi.Client 5.2.3
 - Microsoft.AspNet.WebApi.Core 5.1.0
 - Microsoft.AspNet.WebApi.Core 5.1.1
Locked version resolution written to D:\Projects\paket-test\paket.lock
5 seconds - ready.

After:

Resolving packages for group Main:
 - WebApiContrib.Formatting.Jsonp 3.0.2
 - Microsoft.AspNet.WebApi.Core 5.1.1
 - Microsoft.AspNet.WebApi.Client 5.1.1
 - Newtonsoft.Json 4.5.11
 - Microsoft.Net.Http 2.2.13
 - Microsoft.Bcl 1.1.7
 - Microsoft.Bcl.Build 1.0.14
 - WebApiContrib.Logging.Raygun 0.9.14
Locked version resolution written to D:\Projects\paket-test\paket.lock
2 seconds - ready.
Contributor

mrinaldi commented Oct 15, 2015

I can't share the paket.dependencies and paket.lock I have here, but I have a small repro.

Of course this repro won't show the huge difference in resolve time, but I think you can get the picture.

Notice how many versions it tries before resolving to the same version it was already locked.
In my case, it tries hundreds of versions for each package (3 or 4 different packages with this behavior).

source https://nuget.org/api/v2

nuget WebApiContrib.Formatting.Jsonp !> 0
nuget WebApiContrib.Logging.Raygun
NUGET
  remote: https://nuget.org/api/v2
  specs:
    Microsoft.AspNet.WebApi.Client (5.1.1)
      Microsoft.Net.Http (>= 2.2.13) - framework: portable-wp80+win+net45
      Newtonsoft.Json (>= 4.5.11) - framework: portable-wp80+win+net45, >= net45
    Microsoft.AspNet.WebApi.Core (5.1.1)
      Microsoft.AspNet.WebApi.Client (>= 5.1.1)
    Microsoft.Bcl (1.1.7) - framework: portable-wp80+win+net45
      Microsoft.Bcl.Build (>= 1.0.10)
      Microsoft.Bcl.Build (>= 1.0.14)
    Microsoft.Bcl.Build (1.0.14) - import_targets: false, framework: portable-wp80+win+net45
    Microsoft.Net.Http (2.2.13) - framework: portable-wp80+win+net45
      Microsoft.Bcl (>= 1.1.3)
      Microsoft.Bcl.Build (>= 1.0.4)
    Newtonsoft.Json (4.5.11) - framework: portable-wp80+win+net45, >= net45
    WebApiContrib.Formatting.Jsonp (3.0.0)
      Microsoft.AspNet.WebApi.Core (>= 5.0.0)
    WebApiContrib.Logging.Raygun (0.9.14)
      Microsoft.AspNet.WebApi.Core (>= 5.1.1)

Just ran paket update

Before:

Resolving packages for group Main:
 - WebApiContrib.Formatting.Jsonp 3.0.2
 - Microsoft.AspNet.WebApi.Core 5.0.0
 - Microsoft.AspNet.WebApi.Client 5.0.0
 - Newtonsoft.Json 4.5.11
 - Microsoft.Net.Http 2.2.13
 - Microsoft.Bcl 1.1.7
 - Microsoft.Bcl.Build 1.0.14
 - WebApiContrib.Logging.Raygun 0.9.14
 - Microsoft.Bcl.Build 1.0.21
 - Microsoft.Bcl 1.1.8
 - Microsoft.Bcl 1.1.9
 - Microsoft.Bcl 1.1.10
 - Microsoft.Net.Http 2.2.15
 - Microsoft.Net.Http 2.2.18
 - Microsoft.Net.Http 2.2.19
 - Microsoft.Net.Http 2.2.20
 - Microsoft.Net.Http 2.2.22
 - Microsoft.Net.Http 2.2.28
 - Microsoft.Net.Http 2.2.29
 - Newtonsoft.Json 5.0.1
 - Newtonsoft.Json 5.0.2
 - Newtonsoft.Json 5.0.3
 - Newtonsoft.Json 5.0.4
 - Newtonsoft.Json 5.0.5
 - Newtonsoft.Json 5.0.6
 - Newtonsoft.Json 5.0.7
 - Newtonsoft.Json 5.0.8
 - Newtonsoft.Json 6.0.1
 - Newtonsoft.Json 6.0.2
 - Newtonsoft.Json 6.0.3
 - Newtonsoft.Json 6.0.4
 - Newtonsoft.Json 6.0.5
 - Newtonsoft.Json 6.0.6
 - Newtonsoft.Json 6.0.7
 - Newtonsoft.Json 6.0.8
 - Newtonsoft.Json 7.0.1
 - Microsoft.AspNet.WebApi.Client 5.1.0
 - Microsoft.AspNet.WebApi.Client 5.1.1
 - Microsoft.AspNet.WebApi.Client 5.1.2
 - Microsoft.AspNet.WebApi.Client 5.2.0
 - Microsoft.AspNet.WebApi.Client 5.2.2
 - Microsoft.AspNet.WebApi.Client 5.2.3
 - Microsoft.AspNet.WebApi.Core 5.1.0
 - Microsoft.AspNet.WebApi.Core 5.1.1
Locked version resolution written to D:\Projects\paket-test\paket.lock
5 seconds - ready.

After:

Resolving packages for group Main:
 - WebApiContrib.Formatting.Jsonp 3.0.2
 - Microsoft.AspNet.WebApi.Core 5.1.1
 - Microsoft.AspNet.WebApi.Client 5.1.1
 - Newtonsoft.Json 4.5.11
 - Microsoft.Net.Http 2.2.13
 - Microsoft.Bcl 1.1.7
 - Microsoft.Bcl.Build 1.0.14
 - WebApiContrib.Logging.Raygun 0.9.14
Locked version resolution written to D:\Projects\paket-test\paket.lock
2 seconds - ready.
@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Oct 16, 2015

Member

That's great. Thanks
On Oct 16, 2015 01:18, "Marcio Rinaldi" notifications@github.com wrote:

I can't share the paket.dependencies and paket.lock I have here, but I
have a small repro.

Of course this repro won't show the huge difference in resolve time, but I
think you can get the picture.

Notice how many versions it tries before resolving to the same version it
was already locked.
In my case, it tries hundreds of versions for each package (3 or 4
different packages with this behavior).

source https://nuget.org/api/v2

nuget WebApiContrib.Formatting.Jsonp !> 0
nuget WebApiContrib.Logging.Raygun

NUGET
remote: https://nuget.org/api/v2
specs:
Microsoft.AspNet.WebApi.Client (5.1.1)
Microsoft.Net.Http (>= 2.2.13) - framework: portable-wp80+win+net45
Newtonsoft.Json (>= 4.5.11) - framework: portable-wp80+win+net45, >= net45
Microsoft.AspNet.WebApi.Core (5.1.1)
Microsoft.AspNet.WebApi.Client (>= 5.1.1)
Microsoft.Bcl (1.1.7) - framework: portable-wp80+win+net45
Microsoft.Bcl.Build (>= 1.0.10)
Microsoft.Bcl.Build (>= 1.0.14)
Microsoft.Bcl.Build (1.0.14) - import_targets: false, framework: portable-wp80+win+net45
Microsoft.Net.Http (2.2.13) - framework: portable-wp80+win+net45
Microsoft.Bcl (>= 1.1.3)
Microsoft.Bcl.Build (>= 1.0.4)
Newtonsoft.Json (4.5.11) - framework: portable-wp80+win+net45, >= net45
WebApiContrib.Formatting.Jsonp (3.0.0)
Microsoft.AspNet.WebApi.Core (>= 5.0.0)
WebApiContrib.Logging.Raygun (0.9.14)
Microsoft.AspNet.WebApi.Core (>= 5.1.1)

Just ran paket update

Before:

Resolving packages for group Main:

  • WebApiContrib.Formatting.Jsonp 3.0.2
  • Microsoft.AspNet.WebApi.Core 5.0.0
  • Microsoft.AspNet.WebApi.Client 5.0.0
  • Newtonsoft.Json 4.5.11
  • Microsoft.Net.Http 2.2.13
  • Microsoft.Bcl 1.1.7
  • Microsoft.Bcl.Build 1.0.14
  • WebApiContrib.Logging.Raygun 0.9.14
  • Microsoft.Bcl.Build 1.0.21
  • Microsoft.Bcl 1.1.8
  • Microsoft.Bcl 1.1.9
  • Microsoft.Bcl 1.1.10
  • Microsoft.Net.Http 2.2.15
  • Microsoft.Net.Http 2.2.18
  • Microsoft.Net.Http 2.2.19
  • Microsoft.Net.Http 2.2.20
  • Microsoft.Net.Http 2.2.22
  • Microsoft.Net.Http 2.2.28
  • Microsoft.Net.Http 2.2.29
  • Newtonsoft.Json 5.0.1
  • Newtonsoft.Json 5.0.2
  • Newtonsoft.Json 5.0.3
  • Newtonsoft.Json 5.0.4
  • Newtonsoft.Json 5.0.5
  • Newtonsoft.Json 5.0.6
  • Newtonsoft.Json 5.0.7
  • Newtonsoft.Json 5.0.8
  • Newtonsoft.Json 6.0.1
  • Newtonsoft.Json 6.0.2
  • Newtonsoft.Json 6.0.3
  • Newtonsoft.Json 6.0.4
  • Newtonsoft.Json 6.0.5
  • Newtonsoft.Json 6.0.6
  • Newtonsoft.Json 6.0.7
  • Newtonsoft.Json 6.0.8
  • Newtonsoft.Json 7.0.1
  • Microsoft.AspNet.WebApi.Client 5.1.0
  • Microsoft.AspNet.WebApi.Client 5.1.1
  • Microsoft.AspNet.WebApi.Client 5.1.2
  • Microsoft.AspNet.WebApi.Client 5.2.0
  • Microsoft.AspNet.WebApi.Client 5.2.2
  • Microsoft.AspNet.WebApi.Client 5.2.3
  • Microsoft.AspNet.WebApi.Core 5.1.0
  • Microsoft.AspNet.WebApi.Core 5.1.1
    Locked version resolution written to D:\Projects\paket-test\paket.lock
    5 seconds - ready.

After:

Resolving packages for group Main:

  • WebApiContrib.Formatting.Jsonp 3.0.2
  • Microsoft.AspNet.WebApi.Core 5.1.1
  • Microsoft.AspNet.WebApi.Client 5.1.1
  • Newtonsoft.Json 4.5.11
  • Microsoft.Net.Http 2.2.13
  • Microsoft.Bcl 1.1.7
  • Microsoft.Bcl.Build 1.0.14
  • WebApiContrib.Logging.Raygun 0.9.14
    Locked version resolution written to D:\Projects\paket-test\paket.lock
    2 seconds - ready.


Reply to this email directly or view it on GitHub
#1141 (comment).

Member

forki commented Oct 16, 2015

That's great. Thanks
On Oct 16, 2015 01:18, "Marcio Rinaldi" notifications@github.com wrote:

I can't share the paket.dependencies and paket.lock I have here, but I
have a small repro.

Of course this repro won't show the huge difference in resolve time, but I
think you can get the picture.

Notice how many versions it tries before resolving to the same version it
was already locked.
In my case, it tries hundreds of versions for each package (3 or 4
different packages with this behavior).

source https://nuget.org/api/v2

nuget WebApiContrib.Formatting.Jsonp !> 0
nuget WebApiContrib.Logging.Raygun

NUGET
remote: https://nuget.org/api/v2
specs:
Microsoft.AspNet.WebApi.Client (5.1.1)
Microsoft.Net.Http (>= 2.2.13) - framework: portable-wp80+win+net45
Newtonsoft.Json (>= 4.5.11) - framework: portable-wp80+win+net45, >= net45
Microsoft.AspNet.WebApi.Core (5.1.1)
Microsoft.AspNet.WebApi.Client (>= 5.1.1)
Microsoft.Bcl (1.1.7) - framework: portable-wp80+win+net45
Microsoft.Bcl.Build (>= 1.0.10)
Microsoft.Bcl.Build (>= 1.0.14)
Microsoft.Bcl.Build (1.0.14) - import_targets: false, framework: portable-wp80+win+net45
Microsoft.Net.Http (2.2.13) - framework: portable-wp80+win+net45
Microsoft.Bcl (>= 1.1.3)
Microsoft.Bcl.Build (>= 1.0.4)
Newtonsoft.Json (4.5.11) - framework: portable-wp80+win+net45, >= net45
WebApiContrib.Formatting.Jsonp (3.0.0)
Microsoft.AspNet.WebApi.Core (>= 5.0.0)
WebApiContrib.Logging.Raygun (0.9.14)
Microsoft.AspNet.WebApi.Core (>= 5.1.1)

Just ran paket update

Before:

Resolving packages for group Main:

  • WebApiContrib.Formatting.Jsonp 3.0.2
  • Microsoft.AspNet.WebApi.Core 5.0.0
  • Microsoft.AspNet.WebApi.Client 5.0.0
  • Newtonsoft.Json 4.5.11
  • Microsoft.Net.Http 2.2.13
  • Microsoft.Bcl 1.1.7
  • Microsoft.Bcl.Build 1.0.14
  • WebApiContrib.Logging.Raygun 0.9.14
  • Microsoft.Bcl.Build 1.0.21
  • Microsoft.Bcl 1.1.8
  • Microsoft.Bcl 1.1.9
  • Microsoft.Bcl 1.1.10
  • Microsoft.Net.Http 2.2.15
  • Microsoft.Net.Http 2.2.18
  • Microsoft.Net.Http 2.2.19
  • Microsoft.Net.Http 2.2.20
  • Microsoft.Net.Http 2.2.22
  • Microsoft.Net.Http 2.2.28
  • Microsoft.Net.Http 2.2.29
  • Newtonsoft.Json 5.0.1
  • Newtonsoft.Json 5.0.2
  • Newtonsoft.Json 5.0.3
  • Newtonsoft.Json 5.0.4
  • Newtonsoft.Json 5.0.5
  • Newtonsoft.Json 5.0.6
  • Newtonsoft.Json 5.0.7
  • Newtonsoft.Json 5.0.8
  • Newtonsoft.Json 6.0.1
  • Newtonsoft.Json 6.0.2
  • Newtonsoft.Json 6.0.3
  • Newtonsoft.Json 6.0.4
  • Newtonsoft.Json 6.0.5
  • Newtonsoft.Json 6.0.6
  • Newtonsoft.Json 6.0.7
  • Newtonsoft.Json 6.0.8
  • Newtonsoft.Json 7.0.1
  • Microsoft.AspNet.WebApi.Client 5.1.0
  • Microsoft.AspNet.WebApi.Client 5.1.1
  • Microsoft.AspNet.WebApi.Client 5.1.2
  • Microsoft.AspNet.WebApi.Client 5.2.0
  • Microsoft.AspNet.WebApi.Client 5.2.2
  • Microsoft.AspNet.WebApi.Client 5.2.3
  • Microsoft.AspNet.WebApi.Core 5.1.0
  • Microsoft.AspNet.WebApi.Core 5.1.1
    Locked version resolution written to D:\Projects\paket-test\paket.lock
    5 seconds - ready.

After:

Resolving packages for group Main:

  • WebApiContrib.Formatting.Jsonp 3.0.2
  • Microsoft.AspNet.WebApi.Core 5.1.1
  • Microsoft.AspNet.WebApi.Client 5.1.1
  • Newtonsoft.Json 4.5.11
  • Microsoft.Net.Http 2.2.13
  • Microsoft.Bcl 1.1.7
  • Microsoft.Bcl.Build 1.0.14
  • WebApiContrib.Logging.Raygun 0.9.14
    Locked version resolution written to D:\Projects\paket-test\paket.lock
    2 seconds - ready.


Reply to this email directly or view it on GitHub
#1141 (comment).

@forki forki merged commit 8723884 into fsprojects:master Oct 16, 2015

2 checks passed

continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@mrinaldi mrinaldi deleted the mrinaldi:prefer_locked_version branch Oct 16, 2015

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