goose icon indicating copy to clipboard operation
goose copied to clipboard

Reduce the size of our gitrepository

Open ezyang opened this issue 8 months ago • 4 comments

There are a lot of binary files that should... not be in here

$ find . -type f -not -path "./.git/*" -exec du -h {} + | sort -rh | head -n 20
 45M	./ui/desktop/src/platform/windows/bin/uv.exe
 29M	./documentation/blog/2025-04-17-goose-goes-to-NY/focus5.jpg
 26M	./documentation/blog/2025-04-17-goose-goes-to-NY/focus3.jpg
 23M	./ui/desktop/src/platform/windows/bin/libstdc++-6.dll
 23M	./ui/desktop/src/bin/libstdc++-6.dll
 22M	./documentation/blog/2025-04-17-goose-goes-to-NY/swag.jpg
 19M	./documentation/blog/2025-04-17-goose-goes-to-NY/focus.jpg
 18M	./documentation/blog/2025-04-17-goose-goes-to-NY/swag1.jpg
 18M	./documentation/blog/2025-04-17-goose-goes-to-NY/speaker1.jpg
 18M	./documentation/blog/2025-04-17-goose-goes-to-NY/fun1.jpg
 17M	./documentation/blog/2025-04-17-goose-goes-to-NY/focus2.jpg
 16M	./documentation/static/videos/hero_light.mp4
 16M	./documentation/blog/2025-04-17-goose-goes-to-NY/fun.jpg
 15M	./documentation/blog/2025-04-17-goose-goes-to-NY/swag2.jpg
 14M	./documentation/docs/assets/goose-in-action.mp4
 13M	./documentation/blog/2025-04-17-goose-goes-to-NY/swag3.jpg
 13M	./documentation/blog/2025-04-17-goose-goes-to-NY/focus4.jpg
 11M	./documentation/static/videos/hero_dark.mp4
9.2M	./documentation/docs/assets/goose-in-action.gif
9.2M	./documentation/blog/2025-04-17-goose-goes-to-NY/speaker.jpg

To fix this you'll have to do some history rewriting so it will be disruptive, but really these should not be checked into VCS.

ezyang avatar Apr 19 '25 02:04 ezyang

these files are big, but since we've decided to go with a monorepo, the documentation and their images are going to land here. I think ./ui/desktop/src/bin/libstdc++-6.dll could probably go though

DOsinga avatar Aug 03 '25 15:08 DOsinga

All of ui/desktop/src/platform/windows/bin looks pretty questionable.

I don't think the history-rewriting is an option but we should get those out.

jamadeo avatar Aug 14 '25 19:08 jamadeo

documentation/blog also has a lot of (useless?) files that add up to 400MB.

│ 465.24 MiB |   46.2%  ████▋      | /.git  
│ 449.00 MiB |   44.6%  ████▌      | /documentation  
│  79.90 MiB |    7.9%  ▊          | /ui                             
│  11.61 MiB |    1.2%  ▏          | /crates    
│ 228.00 KiB |    0.0%             | /.github 

UI is also unreasonably big - why are you storing binaries (exe files????) in the repo?

┌ ui/desktop/src/platform/windows/bin (9 visible, 9 total, 69.00 MiB) 
│  45.09 MiB |   65.3%  ██████▌    |  uv.exe  
│  22.63 MiB |   32.8%  ███▎       |  libstdc++-6.dll 
│ 652.00 KiB |    0.9%  ▏          |  libgcc_s_seh-1.dll 
│ 328.00 KiB |    0.5%             |  uvx.exe 
│ 312.00 KiB |    0.4%             |  libwinpthread-1.dll
│   4.00 KiB |    0.0%             |  npx.cmd
│   4.00 KiB |    0.0%             |  jbang.cmd
│   4.00 KiB |    0.0%             |  install-node.cmd
│   4.00 KiB |    0.0%             |  README.md

denysvitali avatar Sep 12 '25 10:09 denysvitali

@denysvitali documentation contains thing for blog posts etc, we could maybe explore moving to a CMS but a bigger change @block/goose-devrel would likely want to drive

As for the binaries in ui/desktop/src/platform/windows/bin I don't know.

@jamadeo are they hermit oriented?

in general though I don't think 60mb there is going to make a huge difference

alexhancock avatar Nov 06 '25 15:11 alexhancock

unfortunately - without re-writing history (ie basically a brand new repo) it isn't possible to get rid of enough to make a difference - so if we want to do that, we can, but @DOsinga last we spoke, worried about losing history, but we can have a separate discussion about that if we need to, as yeah, it is chunky.

michaelneale avatar Nov 25 '25 00:11 michaelneale

It is possibile, but it will rewrite the history (commits are kept): https://www.git-tower.com/learn/git/faq/git-filter-repo

denysvitali avatar Nov 25 '25 19:11 denysvitali