manga-download / hakuneko

Manga & Anime Downloader for Linux, Windows & MacOS
https://hakuneko.download
The Unlicense
4.79k stars 469 forks source link

[Feature] Reduce Git repo size by half #7465

Open Starmania opened 1 month ago

Starmania commented 1 month ago

Is your feature request related to a problem? Please describe. A repo of 1.5GB is not easy to work with. Just downloading on a not-so-good ethernet is a nightmare.

Describe the solution you'd like Note hat will also delete local stashed data. Please check before executing.

git gc --aggressive --prune=now git push --force

Describe alternatives you've considered New base ?

Context (please complete the following information):

Additional context image

Starmania commented 1 month ago

Also, with 12 cores 12 GB of ram, it failed. But on my other PC with 12 cores 32GB, it worked.

Starmania commented 1 month ago

I could provide my PC for the push, 32 GB is not that common...

ronny1982 commented 1 month ago

Have you tried a shallow clone e.g., --depth 1?

ronny1982 commented 1 month ago

Your memory inflating during git clone sounds weird. It is just a network operation + extracting content. On my potato system (4-Core, 8GB) it barely adds 100MB memory usage when cloning HakuNeko.

Starmania commented 1 month ago

Your memory inflating during git clone sounds weird. It is just a network operation + extracting content. On my potato system (4-Core, 8GB) it barely adds 100MB memory usage when cloning HakuNeko.

No problem to clone the repo beside you just downloaded 1.5GB of data (that could be reduced to 0.5GB). The heavy task is pruning as git need to keep in memory objects to compress them efficiently.

shallow clone

The solution for people who want the full repo without commits, but still take storage on servers.