Using cache for packages slows down build time

raul's Avatar

raul

22 Jul, 2019 06:19 PM

Hi,

I have enabled cache for .nuget packages, and build times seem to go up with the cache. Examples:

+ 0.1.21: 1 min 28 sec - WITHOUT 
+ 0.1.20: 1 min 56 sec - WITH
+ 0.1.19: 2 min 03 sec - WITH
+ 0.1.18: 2 min 34 sec - WITH
+ 0.1.17: 1 min 30 sec - WITHOUT 
+ 0.1.16: 1 min 37 sec - WITHOUT
...

I'm using

# build cache to preserve files/folders between builds
cache:
  - '%USERPROFILE%.nuget\packages -> **.sln, **.csproj'  # preserve nuget folder (packages) unless the solution or projects change


before_build: - nuget restore myApp.sln


build: project: myApp.sln # path to Visual Studio solution or project

Anything to look for on what causes this? Nuget packages seems to be one of the recommended usages of the cache.

Thanks,
Raul.

  1. 1 Posted by Owen McDonnell on 22 Jul, 2019 09:35 PM

    Owen McDonnell's Avatar

    The cache needs to populate within multiple data centers so it may take some number of builds before performance gains can be realized.
    After how many are you measuring?

  2. 2 Posted by raul on 22 Jul, 2019 09:39 PM

    raul's Avatar

    The small count you see above. I can enable it for the project and report back in a few days.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac