-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Bashit light weight for servers #1825
Comments
@nwinkler @NoahGorny any ideas on this? |
Is the performance an issue or the repo size? If the performance is an issue, we can just add a new installation option for servers, which enables only the most suitable plugins and themes for servers |
Basically it's both. But I would like to stick to performance issue |
IMHO, this is a duplicate of packing up for distribution, because when doing so we would not include any git history, making the install very lightweight. However, in the meantime, this point about changing default plugins might be worth exploring. We could open a PR to add an install flag for this, as @NoahGorny suggests. Edit: could also try to automate this by testing for a headless environment, e.g. no x11 or wayland. |
The repo size issue is caused by
To your point, @tbhaxor, "purging all the unnecessary files" will not fix this, as it will simply add more history, the cloned repo size will not really shrink. The current installation instructions recommend to do a shallow fetch, which results in 1.2 MiB (which still seems rather large - might be worth investigating). TBH, with today's download speeds, a download size of 1 MiB (or even 3 MiB) shouldn't be a problem at all. You've got a point about the initialization time - but as mentioned, that can be handled using the installer. |
Hi Team, Okay I've been grinding on this ... I see @tbhaxor mentioned their main concern was performance, but my thoughts are mostly related to install size ... Reduced runtime overhead
I think there could be value to having install There's also value in a
I don't think we enable any themes by default, right? So the user/admin has full control over that. Reduced Install footprintI think the use-case for having Bash-it installed with a reduced footprint is valid. I don't find much value in the idea of a separate, "lightweight" distribution. Until Bash-it can download+install components on-demand (ala brew per se), you'll never please everyone with the component choices that go into a sub distro. What I think would be valuable is either a built-in function(s), or a documented process, for removing unused components and unneeded files, etc. For instance, it would be pretty easy to Detect and Delete aliases, completions and plugins that were not Enabled.
Themes would be a bit harder, because some themes rely on others.
Unneeded files in release archivesAdditionally, I feel our Releases contain a lot of files that are likely not needed by the average user:
NOTE: I might consider the I recommend we consider removing these files/directories from our official release archives. Users who want to contribute should be encouraged to checkout from source, and they would pickup these files that way. Lastly, you could also imagine a bash-it command to remove these files (and the
NOTE: NOTE: I suspect users of this action would like the ability to consider the
User-created distrosOne of the goals with these tools would be to allow users to easily create their own distros. With that idea in mind, we may also want to consider a Bash-it command to archive itself:
-DF |
Currently we are using latest tag to determine the current stable version of bashit. Why not we add a simple file that would download the tarball / zip from github released of latest plugin and extract it in the Something like curl https://github/bashit/install.sh | sh Please note, there would be no frequent updates on server. As servers are meant to be keep running on lts versions unless there is serious security flaw in it (here bash interpreter) |
Thanks for the summary, @davidpfarrell!
The Install footprint: Do we really see value in saving a couple of megabytes here? The overall size of the Themes, Plugins, Aliases, and Completions is about 2 - 3 MiB in total. Do we really want to go through all this work to save a couple of KB here and there? The impact of having to handle the local Git changes when removing files seems unnecessarily complex - unless we convert the cloned repo to a non-Git folder and stop tracking local changes... I agree that a lot of the development-related files like Editorconfig don't belong in a packaged distribution, but that's something we can cover as part of the packaging. A dedicated command for that feels like overkill. |
@davidpfarrell By default bobby theme is enabled
For this we can use makefile approach
Also,
We can use something like
This is an abstract idea |
Ohk let's not make this complicated. My whole point was, in servers we want very few things like
We can use @NoahGorny's approach. I really liked that instead of creating separate repo or branch simply add flag. Nice thinking brother |
Oops. Accidentally closed. Sorry about that 😅 |
An install profile similar to the Maybe a On the other hand, if you end up wanting the same config on every one of your servers, a backup/restore of your current configuration might be a smarter way to go about this. I'd like to point to this again: https://github.com/nwinkler/dotfiles/blob/master/home/bin/backup-bash-it - the resulting file can be backed up in Git and then run on any server where you want the same Bash-it configuration... |
I really like the |
@NoahGorny How can I test this? |
@tbhaxor, create a new profile file named "minimal.bash_it" or similar. You could create a new branch and just edit I think the biggest candidate for removal is the alias completion, but there's really not much in there. Maybe alsö set |
Closing as #1865 solves this |
Expected Behavior
There should be a light version of bashit for servers with essentials like
Current Behavior
The current size is 3.4 mB which is kinda huge for servers. There we need some light weight solution that runs faster
Possible Solution
From the current repo, purge all the unnecessary files and add few servers specific functionalities
The text was updated successfully, but these errors were encountered: