Skip to content
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

Bloated SPM Repository Checkout #42

Open
nicorichard opened this issue Aug 1, 2024 · 2 comments
Open

Bloated SPM Repository Checkout #42

nicorichard opened this issue Aug 1, 2024 · 2 comments

Comments

@nicorichard
Copy link

nicorichard commented Aug 1, 2024

Issue

  • Resolving this dependency with Swift Package Manager takes a long time
  • Using this dependency consumes too much Hard Drive space

Context

This repository appears to exist as a mirror to provide a thinner version of the Sendbird UIKit for Swift Package Manager clients.

However, rather than using the framework binary which you make available on the Github release, this library has elected to store and reference a binary framework hosted directly in source control. This leads SPM to download not only the current release, but to checkout all previous releases when resolving the UIKit dependency.

This leads to a much-much larger download than necessary.

Worse yet, this information is not cleared after the installation, it sits in the developer's machine wasting hard drive capacity as well. A developer using the Sendbird UIKit in a modular project might have numerous copies of this repository on their machine. I have ~5GB dedicated to it myself.

Derived Data

1 copy per project using Sendbird

Screenshot 2024-08-01 at 9 47 25 AM

Swift PM Cache

1 copy per machine

Screenshot 2024-08-01 at 10 40 34 AM

Solution

I've created a repository demonstrating how I believe this package should be vendored.

Using this package (in the same way that you would install this one) leads to a much faster download and much less data retention

Derived Data

Screenshot 2024-08-01 at 10 30 51 AM

Swift PM Cache

Screenshot 2024-08-01 at 10 43 08 AM
@adam-oleksiak
Copy link

Hi @nicorichard the iOS UIKit was already supposed to implement these suggestions however there was an issue with the deployment which will be fixed soon.

@famous90
Copy link

famous90 commented Oct 7, 2024

Hi @nicorichard, I'm an engineering manager from the Client Mobile team.

Thank you very much for your suggestion and your interest in our products.
We have reviewed your suggestions and found that we've developed them to this repository before, but due to a problem with the release pipeline, it returned in a way that needed to be optimized as it is now. Even if we apply your suggestion to this repository, it will not be applied since it's already cached, so we decided to optimize the package manager after we created a universal repository. Since we need to add it to the release pipeline, it may take a little bit long time, so please understand it. We are planning to put it so that it can be optimized in this year, so we would appreciate it if you could wait a little bit.

Once again, thank you very much for your interest and suggestion. cc` @adam-oleksiak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants