Vauxoo / docker-odoo-image

Base docker image for instances
GNU General Public License v2.0
18 stars 29 forks source link

Bash too late in big git repositories #93

Closed JulioSerna closed 8 years ago

JulioSerna commented 8 years ago

In some repositories like this, bash odoo-8 0

The bash color is causing delay, and in that case the odoo-8.0 always is red

JulioSerna commented 8 years ago

I propose only keep the bash color for the repositories build like this, bash-color-build

gomezvillegasdaniel commented 8 years ago

:+1:

KarenKawaii commented 8 years ago

:+1:

zaoral commented 8 years ago

I really like and use the bash color branch status. But if it is a performance issue I agree to disable it.

I vote for disable this as a default feature but I will like to have an extra command or an easy way to activate the feature in my containers.

zaoral commented 8 years ago

Why I support the color bash status for directory with branch? Because generally when we enter inside a directory that have a branch we intermediately do a git status to know what is the current status of the branch.

The colorized bash do exactly the same step: Check if the current directory is a branch, and if True make a git status: if there are changes turns the bash to red, If there is not change then turns the bash to green.

So the colorized bash is saving this first git status we do almost all the time.

I think the problem with the odoo-8.0 branch is that is too big to check the status. We need a way to optimize the branch. IMHO a way to do that is to compress the file revisions. This can be accomplish with this command

git gc --aggressive

For more information about how this command works only need to make a git gc --help but here is a summary of the information we need.

    git-gc - Cleanup unnecessary files and optimize the local repository

   Runs a number of housekeeping tasks within the current repository, such as compressing file revisions (to reduce disk space and increase
      performance) and removing unreachable objects which may have been created from prior invocations of git add.

OPTIONS
       --aggressive
           Usually git gc runs very quickly while providing good disk space utilization and performance. This option will cause git gc to more
           aggressively optimize the repository at the expense of taking much more time. The effects of this optimization are persistent, so this option
           only needs to be used occasionally; every few hundred changesets or so.

I hope this information and this point of view help to make the decision. How ever, if we still need to disable this functionality please make a way to manually re enable it for those who use it.

Best Regards

osvalr commented 8 years ago

as an alternative for this is using zsh, it is already installed

moylop260 commented 8 years ago

@osvalr

as an alternative for this is using zsh, it is already installed

The main issue isn't the /bin/bash or zsh

We have the follow script to detect a change in the git repository and change the color of branch in bash: git-branch-color-prompt

If we add the same script in zsh we will have the same issue.

Do you understand me?

moylop260 commented 8 years ago

All I added git gc --aggressive script to Dockerfile and I executed git pull vauxoo/odoo-80-image-shippable-auto in developers servers (raditz).

I hope your feedback of performance to kwon the future of this feature.

Thanks!

osvalr commented 8 years ago

@moylop260 I see. I'll be watching how long it takes with that change you made.

moylop260 commented 8 years ago

FYI zsh use follow script and have the same issue with big git folders.

LuisAlejandro commented 8 years ago

@moylop260 please close this issue, as it was resolved by #96