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

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

Open
blueyed opened this issue Oct 10, 2016 · 7 comments
Open

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

blueyed opened this issue Oct 10, 2016 · 7 comments

Comments

@blueyed
Copy link
Member

blueyed commented Oct 10, 2016

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

  • 696.0 KiB [ ] /man

From share/vim/vim80:

  • 6.6 MiB [##########] /doc
  • 3.5 MiB [##### ] /spell
  • 2.3 MiB [### ] /tutor
  • 1.0 MiB [# ] /lang
  • 348.0 KiB [ ] /keymap

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
Copy link
Collaborator

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
Copy link
Member Author

blueyed commented Oct 10, 2016

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
Copy link
Collaborator

Oh sorry, yes. Those look fine to me.

@tweekmonster
Copy link
Collaborator

I had some thoughts after scanning through them:

  • I wonder why there isn't a build option to only include localizations that matches $LANG.
  • I'm not a multilingual user--I don't know the importance of lang or keymap in regard to automated tests.
    • Their sizes are relatively small and it would be dumb to include the much larger doc and tutor if --no-prune is used when only the localizations are required.
  • I could imagine a plugin needing spell if a plugin interacts with that feature.
  • It seems that much of the bulk in spell, lang, and tutor is localization files. Deleting the localizations and leaving the default en localizations would give a "complete" installation without completely neutering the shared directories.
  • tutor is only useful if you're testing the tutor feature.

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
Copy link

bounceme commented Mar 25, 2017

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
Copy link
Member Author

blueyed commented Mar 25, 2017

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

blueyed added a commit to blueyed/vim-testbed that referenced this issue Mar 25, 2017
This requires to install ncurses explicitly, which was installed as a
dep for bash before, and Vim requires it.

Ref: Vimjas#20 (comment)
@blueyed blueyed mentioned this issue Mar 25, 2017
@blueyed
Copy link
Member Author

blueyed commented Mar 25, 2017

#26 removes bash.

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

No branches or pull requests

3 participants