test: Compile json to hex separately, at most once #16120

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:1905-testJson changing 8 files +31 −18
  1. MarcoFalke commented at 2:31 PM on May 29, 2019: member

    The json test data serialized in hex can be quite large and would be parsed by the compiler each time the header file is included, causing OOM even with make -j 1.

    Slightly decrease the memory usage by compiling the json to hex separately from the tests and do it at most once (regardless of how often the header is included).

  2. fanquake added the label Tests on May 29, 2019
  3. test: Compile json to hex separately, at most once fa517ac9ec
  4. MarcoFalke force-pushed on May 29, 2019
  5. MarcoFalke commented at 3:07 PM on May 29, 2019: member

    I couldn't find a difference in memory usage, so this should be closed.

    For reference:

    file rss (kB) compile time (s)
    test/data/base58 encode decode.json hex.cpp 48588 0.98
    test/data/blockfilters.json hex.cpp 52312 0.73
    test/data/key io invalid.json hex.cpp 49504 0.84
    test/data/key io valid.json hex.cpp 51484 0.70
    test/data/script tests.json hex.cpp 106008 2.04
    test/data/sighash.json hex.cpp 105196 1.88
    test/data/tx invalid.json hex.cpp 61392 0.90
    test/data/tx valid.json hex.cpp 67280 1.19
  6. fanquake closed this on May 29, 2019

  7. MarcoFalke deleted the branch on May 29, 2019
  8. practicalswift commented at 2:35 PM on May 30, 2019: contributor

    @MarcoFalke What tools do you use to construct the nice rss/compile time tables? Do you measure using time?

  9. DrahtBot locked this on Dec 16, 2021
Labels

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-17 06:14 UTC

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