-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
It used to take a flash to clone the repo. Now the repo size has grown to a whopping 257MB, with but 21720 git objects in the pack to be downloaded.
Why I use whopping, to compare:
Git itself has 286253 git objects, with a size of 112MB
.NET Corefx has 749047 git objects, with a size of 181MB.
With a checkout on the master, we can see this folder info:
82M ./docs
464K ./githubresources
924K ./Microsoft.Toolkit.Uwp
796K ./Microsoft.Toolkit.Uwp.Notifications.NETStandard
664K ./Microsoft.Toolkit.Uwp.Notifications.Portable
1.7M ./Microsoft.Toolkit.Uwp.Notifications.UWP
2.2M ./Microsoft.Toolkit.Uwp.Notifications.WinRT
75M ./Microsoft.Toolkit.Uwp.SampleApp
1.5M ./Microsoft.Toolkit.Uwp.Services
852K ./Microsoft.Toolkit.Uwp.UI
880K ./Microsoft.Toolkit.Uwp.UI.Animations
2.9M ./Microsoft.Toolkit.Uwp.UI.Controls
2.0M ./Notifications
43M ./UnitTests
976K ./UnitTests.Notifications.Portable
16M ./UnitTests.Notifications.UWP
Going further down we can discover a lot culprits being images, e.g. under UWPCommunityToolkit/docs/resources/images we have a list:
82K adaptive.GIF
141K AddNugetServices.png
266K Animations-Blur.gif
34K Animations-Fade.gif
967K Animations-FadeHeader.gif
132K Animations-Light.gif
93K Animations-Offset.gif
285K Animations-Rotate.gif
177K Animations-Scale.gif
163K choosetoolboxitems.png
5.5M Controls-AdaptiveGridView.gif
625K Controls-BladeView.gif
117K Controls-DropShadowPanel.png
502K Controls-Expander.gif
12K Controls-GridSplitter.png
1.4M Controls-HamburgerMenu.gif
2.8K Controls-HeaderedTextBlock.png
1.9M Controls-ImageEx.gif
6.7M Controls-MarkdownTextBlock.gif
3.8M Controls-MasterDetailsView.gif
125K Controls-PullToRefreshListView.gif
289K Controls-RadialGauge.gif
24K Controls-RangeSelector.gif
1.7M Controls-RotatorTile.gif
230K Controls-ScrollHeader.gif
231K Controls-SlidableListItem.gif
5.8K Controls-TextBoxMask.png
5.8K Controls-TextBoxRegex.png
9.2K Controls-WrapPanel.png
2.3M hamburgermenu.gif
8.5K head.GIF
496K herotile.png
132K imageex.GIF
8.0M LoadingXamlControl.gif
36K ManageNugetPackages.png
183K Notifications-LiveTile.gif
174K Notifications-PopToast.gif
18K Notifications-WeatherLiveTileAndToast.png
51K NugetPackages.png
27M ParallaxService.gif
23K radial.GIF
6.1K range.GIF
18M ReorderGrid.gif
101K sampleapp.png
45K sampleapp-small.png
104K slideable.GIF
63K SurfaceDialTextboxAnim.gif
16K SurfaeDial.jpg
118K TileControl.gif
4.5K toolboxfinal.png
43K Toolkit_Responsive_Behavior_v01_img-MD-SM.png
49K Toolkit_Responsive_Behavior_v01_img-XL.png
25K Toolkit_Responsive_Behavior_v01_img-XS.png
12K weatherlivetilentoastNotification.GIF
60K WinSDKFBInstall.png
Seriously guys, one single gif to be 27M?
No intention to offend anyone. But git was designed to version on text data, not binary image. And once you commit and push, it will be in the history almost forever, it is very hard to try to remove an object from history (although possible). In our case, we can't even escape from git clone --depth=1 trick that you can do if you dare to clone Linux kernel (object number approaching 6 million, download size around 2GB), since one recent commit will still drag in all these images.
(edit: now I tried clone our toolkit with depth 1, we are downloading 1276 objects, with a download size of 105MB)
Having a huge repo is bad, think about how fast CI/CD can run, jenkins/appveyor can only start to build after clone. And the wasted Internet bandwidth plus kittens.
Sorry about my ultra-sensitivity on this, I was testing my store App built-in git clone functions using the toolkit repo as a target, and found out it's extremely slow...