git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git status takes too long- How to improve the performance of git

From
Fredrik Gustafsson <iveqy@iveqy.com>
Date
Nov 16, 2016, 13:21 UTC
Message-ID
<20161116132154.GA18362@paksenarrion.iveqy.com>
In-Reply-To
<CAEAva_1JAu+kWmk3MZDFK=4CgQB5M+JN8FwzMVr6zKgXTAhdXw@mail.gmail.com>
On Wed, Nov 16, 2016 at 05:13:57PM +0530, Renuka Pampana wrote:
Show 14 quoted lines
> > On Tue, Nov 15, 2016 at 02:33:12AM -0700, ravalika wrote:
> > > It is an centralized server and git status takes too long
> >
> > A centralized server? How? git is designed to be runned locally. If
> > you're running git on a network file system, the performance will
> > suffer. Could you elaborate on how your environment is setup?
> >
> >
> We have setup main git repository in remote location on Linux server
> And created a git repository in local Linux server, as a reference for the
> remote git repository,
> And update the local git repository for every 15 min in local server
> 
> Users will be able to access the  local git repository through NFS

And each user will have their own copy of the repository locally on their machine? That is having done a git clone?

Show 8 quoted lines
> 
> All users will clone the git repository from remote project url  by using
> local git repo as reference
> 
>  For example : git clone --reference ~/gitcaches/reference user@drupal
> :/home/project/drupal.git
> 
> All the users have ssh credentials for the remote server
Why are you using --reference for a 8.9MB big clone?
Show 6 quoted lines
> 
> 
> What is the best way to implement remote git repo and able to access the
> git repo from other location, without any performance glitches?
> Users should be able to access git repo from different servers and from
> different locations.

The best way is to have it locally cloned. Yes the initial clone will be expensive but operations after that will be fairly smooth. You do not(!) want to execute git on one machine and having the repository beeing on an other machine (for example via a network file system, except git clone, git fetch, git push, etc.).

Show 18 quoted lines
> >
> > > How to improve the performance of git status
> > >
> > > Git repo details:
> > >
> > > Size of the .git folder is 8.9MB
> > > Number of commits approx 53838  (git rev-list HEAD --count)
> > > Number of branches -  330
> > > Number of files - 63883
> > > Working tree clone size is 4.3GB
> >
> > .git folder of 8.9 MEGABYTE and working tree of 4.3 GIGABYTE? Is this a
> > typo?
> >
> > All git related information is stored in .git directory of the working
> directory
>   It is 8.9M
> And size of the local workspace is 4.3G

Can you please elaborate on this? How can you store 8.9 MB of data that will result in a 4.3 G workspace?

-- 
Fredrik Gustafsson

phone: +46 733-608274
e-mail: iveqy@iveqy.com
website: http://www.iveqy.com
Previous: MaryTurner
Message 6 of 6 in “Git status takes too long- How to improve the performance of git”
  1. ravalikaNov 15, 2016
  2. Fredrik GustafssonNov 15, 2016
  3. Christian CouderNov 15, 2016
  4. Heiko VoigtNov 15, 2016
  5. MaryTurnerNov 24, 2016
  6. Fredrik GustafssonNov 16, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.