docs: Add more tips to productivity.md #15603

pull gwillen wants to merge 1 commits into bitcoin:master from gwillen:patch-1 changing 1 files +28 −0
  1. gwillen commented at 8:01 PM on March 14, 2019: contributor

    Add advice to productivity.md on:

    • Using ccache to optimal effect
    • The with-incompatible-bdb configure option
    • Building less than the entire set of targets
  2. in doc/productivity.md:71 in 8226dd3606 outdated
      63 | @@ -51,6 +64,12 @@ If you have multiple threads on your machine, you can tell `make` to utilize all
      64 |  make -j"$(($(nproc)+1))"
      65 |  ```
      66 |  
      67 | +### Only build what you need
      68 | +
      69 | +When rebuilding incrementally while developing, be aware that running `make` with no targets will do a _vast_ amount of work, most of which you probably don't care about. In particular, it will build the GUI (unless you've disabled it) and all the tests (which take a significant multiple of the time to build the application itself.)
      70 | +
      71 | +Obviously it is important to build and run the tests at appropriate times -- but when you just want a quick compile to check your work, consider `make src/bitcoind` or similar.
    


    promag commented at 8:14 PM on March 14, 2019:

    Could mention that can make multiple targets and/or give more examples:

    • make -j src/bitcoind src/bitcoin-cli
    • make -j src/qt/bitcoin-qt
    • make -j -C src bitcoin_bench

    gwillen commented at 5:50 AM on March 15, 2019:

    Done!


    jonatack commented at 2:16 PM on March 15, 2019:

    Nice.

  3. promag commented at 8:16 PM on March 14, 2019: member

    Concept ACK.

  4. fanquake added the label Docs on Mar 14, 2019
  5. gwillen force-pushed on Mar 15, 2019
  6. gwillen force-pushed on Mar 15, 2019
  7. gwillen force-pushed on Mar 15, 2019
  8. gwillen commented at 5:50 AM on March 15, 2019: contributor

    I am deeply concerned that it took me three pushes to correctly spell the word "development".

    Added some examples of build targets per promag. Reworded some of my prose to make it less wordy, abstruse, verbose, talkative, lengthy, long-winded, loquacious, etc.

  9. jonasschnelli commented at 6:07 AM on March 15, 2019: contributor

    ACK c018b918bdd23377bd3aeaa88e09928299a780f0

  10. in doc/productivity.md:43 in c018b918bd outdated
      38 | +```
      39 | +max_size = 50.0G  # or whatever cache size you prefer; default is 5G; 0 means unlimited
      40 | +base_dir = /home/yourname  # or wherever you keep your source files
      41 | +```
      42 | +
      43 | +Note: base_dir is required for ccache to share cached compiles of the same file across different repositories / paths; it will only do this for paths under base_dir. So this option is required for effective use of ccache with git worktrees (described below.)
    


    promag commented at 12:29 AM on March 16, 2019:

    nit, here and below should be )., not .)?


    gwillen commented at 5:12 PM on March 18, 2019:

    Even though the way I did it is clearly grammatically not sensible, for some reason I thought it was normal, so I polled some of my friends on IRC and it turns out I'm the only person I know who does it this way. Personal quirk, I guess? Will fix.


    promag commented at 2:00 AM on March 20, 2019:

    There are more cases below.


    gwillen commented at 7:39 PM on March 22, 2019:

    Heh, fixed two more instances.

  11. promag commented at 12:33 AM on March 16, 2019: member

    ACK c018b91.

  12. gwillen force-pushed on Mar 18, 2019
  13. gwillen commented at 1:39 AM on March 20, 2019: contributor

    I have no idea what's up with Travis but I'm pretty sure I didn't do it.

    I think this should be mergeable.

  14. docs: Add more tips to productivity.md
    Add advice to productivity.md on:
    - Using ccache to optimal effect
    - The with-incompatible-bdb configure option
    - Building less than the entire set of targets
    5801dd628d
  15. gwillen force-pushed on Mar 22, 2019
  16. promag commented at 3:04 AM on March 24, 2019: member

    utACK 5801dd6.

  17. in doc/productivity.md:39 in 5801dd628d
      32 | @@ -32,6 +33,17 @@ Install `ccache` through your distribution's package manager, and run `./configu
      33 |  
      34 |  To use ccache for all your C/C++ projects, follow the symlinks method [here](https://ccache.samba.org/manual/latest.html#_run_modes) to set it up.
      35 |  
      36 | +To get the most out of ccache, put something like this in `~/.ccache/ccache.conf`:
      37 | +
      38 | +```
      39 | +max_size = 50.0G  # or whatever cache size you prefer; default is 5G; 0 means unlimited
    


    MarcoFalke commented at 8:02 PM on March 25, 2019:

    I'd rather not bikeshed, but is there any reason to increase this over the default? I never touched this and it seems to work fine. Increasing it too much means you'd have files laying around that are outdated at some point anyway, because your distributions compiler got updated in the meantime.

    I guess it could be relevant when you compile more than one project regularly?


    gwillen commented at 9:16 PM on March 25, 2019:

    FWIW I don't compile anything other than different branches of bitcoin core, and I've only been using it a couple months, and my cache is currently 12.5 GB. I increased it because even just testing it on 2-3 branches of core, I was seeing it start to fill significantly. I think 5 GB is just a ludicrously puny size in the modern era of storage. I feel pretty happy about 50 currently, and you're right that there are decreasing marginal benefits at some point (but I think 5 GB is WAY below that point, and doesn't feel like a sensible default for ccache to have.)

  18. MarcoFalke commented at 8:03 PM on March 25, 2019: member

    utACK 5801dd6

  19. MarcoFalke referenced this in commit 8a8b03ecd2 on Mar 25, 2019
  20. MarcoFalke merged this on Mar 25, 2019
  21. MarcoFalke closed this on Mar 25, 2019

  22. gwillen deleted the branch on Mar 25, 2019
  23. PastaPastaPasta referenced this in commit fac428f9f5 on Jun 27, 2021
  24. PastaPastaPasta referenced this in commit 1e13ba5b1a on Jun 28, 2021
  25. PastaPastaPasta referenced this in commit 0bbdbf90a1 on Jun 29, 2021
  26. PastaPastaPasta referenced this in commit 2065c25afe on Jul 1, 2021
  27. PastaPastaPasta referenced this in commit f62f3f470f on Jul 1, 2021
  28. PastaPastaPasta referenced this in commit 5a348a2aaa on Jul 8, 2021
  29. PastaPastaPasta referenced this in commit 407b503918 on Jul 10, 2021
  30. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me