Vimjas / vim-testbed

Docker image for testing Vim plugins
42 stars 6 forks source link

Optimize image size: remove doc/tutor/etc? #20

Open blueyed opened 7 years ago

blueyed commented 7 years ago

Looking at /vim-build/vim_*/share there are a lot of things that could be possibly pruned:

From share/vim/vim80:

Currently vim_v8.0.0027_py0_rb0_lua0 takes 27.9 MiB, which is not that much by itself, but 6 builds will be 160.0 MiB (Apparent size: 137.0 MiB) then.

What about an option to the install_vim script to prune those (we can agree on)?

tweekmonster commented 7 years ago

Hmm, yeah. A flag like --no-prune in case those files are needed for testing.

The potential size is higher if you consider multiple builds of the same Vim version. Like having multiple builds for Python 2 and Python 3 would mean that there's 2n builds, or 3n if you want to include a build without Python.

Maybe a further optimization would be for the same Vim version to share the shared directory. Instead of vim_v8.0.0027_py0_rb0_lua0 it would be vim_v8.0.0027/py0_rb0_lua0/... with the shared data at vim_v8.0.0027/shared

blueyed commented 7 years ago

Maybe a further optimization would be for the same Vim version to share the shared directory.

Good idea.

What's your opinion on which to remove? Are the ones I've listed OK?

tweekmonster commented 7 years ago

Oh sorry, yes. Those look fine to me.

tweekmonster commented 7 years ago

I had some thoughts after scanning through them:

I think pruning those directories is 100% fine since I personally can't see a use for them. So, I don't think these need to be considered to address this issue. I'm mainly writing it out in case they give you an epiphany or someone in the future is searching the issues to figure out why they got pruned 🤓

bounceme commented 7 years ago

maybe use alpine's default shell? bash 4.4 is 9mb on my mac, vs 200k for dash

https://github.com/tweekmonster/vim-testbed/blob/master/scripts/run_vim.sh#L6 the == is the only bash specific thing according to shell check

blueyed commented 7 years ago

IIRC I am using / rely on bashisms in Neomake's tests.

blueyed commented 7 years ago

26 removes bash.