Skip to content

Commit

Permalink
Recommend Git's manyFiles feature (spack#25977)
Browse files Browse the repository at this point in the history
Git 2.24 introduced a feature flag for repositories with many files, see:
https://github.blog/2019-11-03-highlights-from-git-2-24/#feature-macros

Since Spack's Git repository contains roughly 8,500 files, it can be
worthwhile to enable this, especially on slow file systems such as NFS:
```
$ hyperfine --warmup 3 'cd spack-default; git status' 'cd spack-manyfiles; git status'
Benchmark #1: cd spack-default; git status
  Time (mean ± σ):      3.388 s ±  0.095 s    [User: 256.2 ms, System: 625.8 ms]
  Range (min … max):    3.168 s …  3.535 s    10 runs

Benchmark #2: cd spack-manyfiles; git status
  Time (mean ± σ):     168.7 ms ±  10.9 ms    [User: 98.6 ms, System: 126.1 ms]
  Range (min … max):   144.8 ms … 188.0 ms    19 runs

Summary
  'cd spack-manyfiles; git status' ran
   20.09 ± 1.42 times faster than 'cd spack-default; git status'
```
  • Loading branch information
michaelkuhn authored Sep 16, 2021
1 parent 5b211c9 commit d73fe19
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for examples and highlights.
To install spack and your first package, make sure you have Python.
Then:

$ git clone https://github.com/spack/spack.git
$ git clone -c feature.manyFiles=true https://github.com/spack/spack.git
$ cd spack/bin
$ ./spack install zlib

Expand Down
2 changes: 1 addition & 1 deletion lib/spack/docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Getting Spack is easy. You can clone it from the `github repository

.. code-block:: console
$ git clone https://github.com/spack/spack.git
$ git clone -c feature.manyFiles=true https://github.com/spack/spack.git
This will create a directory called ``spack``.

Expand Down
2 changes: 1 addition & 1 deletion lib/spack/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ package:

.. code-block:: console
$ git clone https://github.com/spack/spack.git
$ git clone -c feature.manyFiles=true https://github.com/spack/spack.git
$ cd spack/bin
$ ./spack install libelf
Expand Down

0 comments on commit d73fe19

Please sign in to comment.