Skip to content

Commit

Permalink
[Docs] Update the Mac and iOS docs for git status perf improvements.
Browse files Browse the repository at this point in the history
BUG=none
TEST=none
R=sdy@chromium.org

Review-Url: https://codereview.chromium.org/2876983004
Cr-Commit-Position: refs/heads/master@{#471477}
  • Loading branch information
ishermandom authored and Commit bot committed May 12, 2017
1 parent fc059e0 commit ce1d9d8
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
20 changes: 18 additions & 2 deletions docs/ios/build_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ is open before checking out. This will increase your chances of success.

### Improving performance of `git status`

#### Increase the vnode cache size

`git status` is used frequently to determine the status of your checkout. Due
to the large number of files in Chromium's checkout, `git status` performance
can be quite variable. Increasing the system's vnode cache appears to help.
Expand All @@ -286,8 +288,22 @@ $ echo kern.maxvnodes=$((512*1024)) | sudo tee -a /etc/sysctl.conf

Or edit the file directly.

If `git --version` reports 2.6 or higher, the following may also improve
performance of `git status`:
#### Configure git to use an untracked cache

If `git --version` reports 2.8 or higher, try running

```shell
$ git update-index --test-untracked-cache
```

If the output ends with `OK`, then the following may also improve performance of
`git status`:

```shell
$ git config core.untrackedCache true
```

If `git --version` reports 2.6 or higher, but below 2.8, you can instead run

```shell
$ git update-index --untracked-cache
Expand Down
20 changes: 18 additions & 2 deletions docs/mac_build_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ tree is open before checking out. This will increase your chances of success.

### Improving performance of `git status`

#### Increase the vnode cache size

`git status` is used frequently to determine the status of your checkout. Due
to the large number of files in Chromium's checkout, `git status` performance
can be quite variable. Increasing the system's vnode cache appears to help. By
Expand All @@ -257,8 +259,22 @@ $ echo kern.maxvnodes=$((512*1024)) | sudo tee -a /etc/sysctl.conf

Or edit the file directly.

If `git --version` reports 2.6 or higher, the following may also improve
performance of `git status`:
#### Configure git to use an untracked cache

If `git --version` reports 2.8 or higher, try running

```shell
$ git update-index --test-untracked-cache
```

If the output ends with `OK`, then the following may also improve performance of
`git status`:

```shell
$ git config core.untrackedCache true
```

If `git --version` reports 2.6 or higher, but below 2.8, you can instead run

```shell
$ git update-index --untracked-cache
Expand Down

0 comments on commit ce1d9d8

Please sign in to comment.