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

Container size optimization #20

Closed
dbalabka opened this issue Dec 6, 2022 · 4 comments
Closed

Container size optimization #20

dbalabka opened this issue Dec 6, 2022 · 4 comments

Comments

@dbalabka
Copy link
Contributor

dbalabka commented Dec 6, 2022

p10k theme takes about 70MB because storing the whole repository git history:

$ du -du -sh ~/.oh-my-zsh/custom/themes/powerlevel10k/.git
74M     /home/vscode/.oh-my-zsh/custom/themes/powerlevel10k/.git
$ du -du -sh ~/.oh-my-zsh/custom/themes/powerlevel10k
76M     /home/vscode/.oh-my-zsh/custom/themes/powerlevel10k
$ du -sh ~/.oh-my-zsh/
85M     /home/vscode/.oh-my-zsh/

IMO you should install oh-my-zsh and p10k without cloning a git repository.

@deluan
Copy link
Owner

deluan commented Dec 6, 2022

Good call, we should do a shallow clone for all cloned repos. Wanna submit a PR?

@dbalabka
Copy link
Contributor Author

dbalabka commented Dec 12, 2022

@deluan done. Please see #21

❯ git clone --depth 1 https://github.com/romkatv/powerlevel10k
Cloning into 'powerlevel10k'...
remote: Enumerating objects: 92, done.
remote: Counting objects: 100% (92/92), done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 92 (delta 18), reused 74 (delta 14), pack-reused 0
Receiving objects: 100% (92/92), 344.05 KiB | 3.62 MiB/s, done.
Resolving deltas: 100% (18/18), done.

❯ du -sh ./powerlevel10k
2.1M    ./powerlevel10k

🚀

@deluan
Copy link
Owner

deluan commented Dec 12, 2022

Thank!

@deluan deluan closed this as completed Dec 12, 2022
@dbalabka
Copy link
Contributor Author

@deluan, you're welcome!

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

2 participants