Skip to content

Display of big repository can exhaust memory #635

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

Closed
baby-gnu opened this issue Nov 30, 2016 · 3 comments
Closed

Display of big repository can exhaust memory #635

baby-gnu opened this issue Nov 30, 2016 · 3 comments
Assignees

Comments

@baby-gnu
Copy link

Hello,

We sometime encounter issues when a user want to look at a repository:

  • when it works, it's long before displaying anything
  • sometime it does not work with a Cannot allocate memory error
Cannot allocate memory - 'sudo' '-n' '-u' 'git' '-i' 'git' '--git-dir' 'repositories/big_repo.git' '-c' 'core.quotepath=false' '-c' 'log.decorate=no' 'tag'

It looks like the git command itself is quite long to execute

redmine@forge-mim:~/redmine-3.2.1$ time sudo -n -u git -i git --git-dir repositories/big_repo.git -c core.quotepath=false -c log.decorate=no log --no-color --encoding=UTF-8 --raw --date=iso --pretty=fuller --parents -n 10 >| output.txt 

real	0m22.064s
user	0m10.596s
sys	0m11.180s

Then the output.txt is huge:

redmine@forge-mim:~/redmine-3.2.1$ wc -l output.txt 
1700525 output.txt

Is there a way to avoid that issue?

Regards.

@baby-gnu
Copy link
Author

baby-gnu commented Jan 2, 2017

Note that the devs had a bad use of Git, storing several releases of a software in separate directories instead of using branches.

This result in lots of files, and one day, they deleted nearly all the noisy files in one commit, this is the reason for so may lines in the outputs.

Regards.

@baby-gnu
Copy link
Author

baby-gnu commented Jun 7, 2017

You can test by importing the Debian samba repository from git://anonscm.debian.org/pkg-samba/samba.git

The repository is around 278MB and it took 41 seconds to execute the following command:

time for rev in 32841b292ef41e4b17367f7bd464f882d57a39dc 4fc764450b6a45509214e0fd54bb54f18d6bc7c4 552f08f2607bbcf9ce5009b2cfe6161bc0743f3b
do
    echo $rev | git -c core.quotepath=false -c log.decorate=no log --no-color --encoding=UTF-8 --raw --date=iso --pretty=fuller --parents --reverse --stdin > /dev/null
done

When I limit with -n 100 the output is quick.

Regards.

@PowerKiKi
Copy link
Collaborator

As discussed in #732 (comment), issues related to Redmine < 4.0 or severely outdated issues are being closed to help clean up the issue tracker.

If this issue is still relevant to you and you are running Redmine >= 4.0, please open a new issue including all new relevant information.

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