util: Replace boost::signals2 with std::function #13961

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1808-utilFun changing 14 files +44 −36
  1. MarcoFalke commented at 8:13 pm on August 13, 2018: member

    This removes the #include <boost/signals2/signal.hpp> from util.h (hopefully speeding up the build time and reducing the memory usage further after #13634)

    The whole translation interface is replaced by a function G_TRANSLATION_FUN that is set to nullptr in units that don’t need translation. (Thus only set in the gui)

  2. MarcoFalke added the label Refactoring on Aug 13, 2018
  3. MarcoFalke force-pushed on Aug 13, 2018
  4. MarcoFalke force-pushed on Aug 13, 2018
  5. MarcoFalke force-pushed on Aug 13, 2018
  6. MarcoFalke force-pushed on Aug 13, 2018
  7. MarcoFalke commented at 9:06 pm on August 13, 2018: member

    For all bitcoind units that depend on util:

    • compile time from 1:13 to 0:42
    • compile mem from 407Mb to 389Mb

    (gcc default ./configure)

  8. practicalswift commented at 9:20 pm on August 13, 2018: contributor

    Excellent!

    Concept ACK

  9. DrahtBot commented at 9:40 pm on August 13, 2018: member
    • #14053 (Add address-based index (attempt 4?) by marcinja)
    • #13389 (Utils and libraries: Fix #13371 - move umask operation earlier in AppInit() by n2yen)
    • #13222 (test: Improve test coverage of SelectCoinsBnB by Empact)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  10. laanwj added this to the "Blockers" column in a project

  11. Empact commented at 7:26 pm on August 23, 2018: member
    utACK fa7db59
  12. in src/util.h:43 in fa7db59dfa outdated
    49-
    50 extern const char * const BITCOIN_CONF_FILENAME;
    51 extern const char * const BITCOIN_PID_FILENAME;
    52 
    53+/** Translate a message to the native language of the user. */
    54+const extern std::function<std::string(const char*)>* G_TRANSLATION_FUN;
    


    promag commented at 10:17 pm on August 23, 2018:

    How about

    0const extern std::function<std::string(const char*)> G_TRANSLATION_FUN;
    

    And below (L51) use https://en.cppreference.com/w/cpp/utility/functional/function/operator_bool?


    MarcoFalke commented at 12:49 pm on August 24, 2018:
    Done
  13. MarcoFalke force-pushed on Aug 24, 2018
  14. util: Replace boost::signals2 with std::function ddddce0e46
  15. MarcoFalke force-pushed on Aug 24, 2018
  16. laanwj commented at 7:13 pm on August 25, 2018: member
    utACK ddddce0e46e73d4ca369f2ce9696231cc579e1f9
  17. laanwj merged this on Aug 25, 2018
  18. laanwj closed this on Aug 25, 2018

  19. laanwj referenced this in commit 6f5372a171 on Aug 25, 2018
  20. MarcoFalke deleted the branch on Aug 25, 2018
  21. in src/bench/bench_bitcoin.cpp:16 in ddddce0e46
    12@@ -13,6 +13,8 @@
    13 
    14 #include <memory>
    15 
    16+const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
    


    promag commented at 10:32 pm on August 27, 2018:
    These = nullptr are not needed since it’s not a pointer and the empty constructor has the same behaviour.
  22. laanwj removed this from the "Blockers" column in a project

  23. zkbot referenced this in commit 77c2a5f810 on Dec 4, 2020
  24. Munkybooty referenced this in commit 6371b139e8 on Jun 28, 2021
  25. Munkybooty referenced this in commit 5ce57423ae on Jun 28, 2021
  26. Munkybooty referenced this in commit 36f6503543 on Jun 28, 2021
  27. Munkybooty referenced this in commit 8904725c02 on Jun 28, 2021
  28. Munkybooty referenced this in commit 8ac2649219 on Jun 29, 2021
  29. Munkybooty referenced this in commit b5e608ad02 on Jun 29, 2021
  30. Munkybooty referenced this in commit e86ea611d4 on Jun 29, 2021
  31. DrahtBot locked this on Feb 15, 2022

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: 2024-12-19 00:12 UTC

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