The custom Unity package, which I developed and deployed on Azure Git, is over 3 GB in size and primarily consists of models, materials, textures, prefabs, etc.
It won’t take long to download the package using the browser, but when I tried to install it using the git url from the Unity package manager, it took three times more time than regular download.
Can somebody tell me why this is the case?
a http download is something quite different than a git download for one, especially given that the former is a straight file transfer while git most likely does other stuff behind the scenes (unless you chose the zip download option, but even so git may even zip up the file on the fly). Also git is primarily optimized for repositories of at most a few hundred mb in size - depending on that the use of git-lfs may be beneficial in your case.
and then you are simply downloading from two different servers that are geographically in different locations, are seeing different numbers of traffic, run on different hardware and software, are connected through different lines and backbones, etc.
in short: there are a number of possible reasons but it‘s really difficult to assess what contributes how much
2 Likes
Hi @jwaman ,
As mentioned by @CodeSmile , if using Git LFS is an option for you, the Package Manager supports that.
Moreover, if you have multiple revisions that reference the same large files, you might want to enable UPM’s Git LFS file cache by following the steps described in the Unity Manual so that if you install the same revision in multiple projects or update from one revision to another that has a lot of the same files, it would reduce the download size by quite a bit (at the expense of using more local file storage). Note: this cache mechanism is opt-in and enabled by setting an environment variable, which isn’t a very user-friendly configuration method if you’re not on Windows.
1 Like