Package Update performance and console output

Topics: General
Mar 19, 2014 at 12:17 PM
Hi,

We have an internal package with a size of 782 content-files. We use this package as platform for a lot of custom build websites.

The problem we're dealing with is the performance of updating this ‘platform package’:

First of all, we can't use the update-command due the fact that it gets errors with TFS (referring: https://nuget.codeplex.com/workitem/4037). So we made a script to uninstall the package, then check-in and then install the new package. This causes that all content-files first need to be removed and then be add again (while there may be only a few differences between the two versions). Remarkably the update-command works the same way, instead of looking for differences. Why is that?

Second, when in- or uninstalling the package, it will output the content-files that has been skipped. This is expected, as we change some of those files at our websites. But what i find interesting is that the uninstall procedure outputs the same files being skipped repetitious:
Skipping 'images\specific\arrow-next-previous.gif' because it was modified.
Skipping 'images\specific\bg-footer-columns.gif' because it was modified.
Skipping 'images\specific\bg-nav.gif' because it was modified.
Skipping 'images\specific\bg-switcher.png' because it was modified.
Skipping 'images\specific\btn-more.png' because it was modified.
Skipping 'images\specific\buttons-search.png' because it was modified.
Skipping 'images\specific\ico-social.png' because it was modified.
Skipping 'images\specific\arrow-next-previous.gif' because it was modified.
Skipping 'images\specific\bg-footer-columns.gif' because it was modified.
Skipping 'images\specific\bg-nav.gif' because it was modified.
Skipping 'images\specific\bg-switcher.png' because it was modified.
Skipping 'images\specific\btn-more.png' because it was modified.
Skipping 'images\specific\buttons-search.png' because it was modified.
Skipping 'images\specific\ico-social.png' because it was modified.
Can this be related to the fact that the uninstall-procedure seems to be slower than the install-procedure? Because I've done some performance testing on this as i found out:
Install   - 45 items skipped - with TFS - takes 4,9 min
Install   - 45 items skipped - no TFS   - takes 1,5 min
Uninstall - 69 items skipped - with TFS - takes 8,5 min
Uninstall - 69 items skipped - no TFS   - takes 5,7 min
As you can see, installing takes less time than uninstalling. Not exactly what i expected because with the installation it first has to download the package whereas uninstallation basically only has to delete the files, or am I wrong about that?

Also the TFS binding influences the install process significantly in comparison to uninstall. Why?

Do you have any suggestions for me to improve the update process of our platform?
Mar 27, 2014 at 2:15 PM
Edited Mar 27, 2014 at 2:16 PM
Looking at the source code of NuGet I found out that the static "DeleteFiles" function in ProjectSystemExtensions.cs probably causes the delay (or is part of), because this code at line 128:
var directories = from grouping in directoryLookup
                  from directory in FileSystemExtensions.GetDirectories(grouping.Key)
                  orderby directory.Length descending
                  select directory;
Gives 'directories' an IEnumerable with 137 items with many duplicates whereas the 'directoryLookup' has 60 items. Is this expected?

And where is 'FileSystemExtensions.GetDirectories(grouping.Key)' good for?