Skip to content

ENH: Use RapidJSON instead of JsonCPP for performance improvement

Andras Lasso requested to merge github/fork/lassoan/terminologies-rapidjson into master

RapidJSON is mganitudes faster than JsonCPP (https://github.com/miloyip/nativejson-benchmark). This is important, because when terminologies (rather large json documents) are parsed/searched/modified then each operation may take hundreds of milliseconds with JsonCPP. Multiple calls easily accumulate to user-perceivable delays (magnitude of seconds). By keep using JsonCPP we would constantly have to optimize number of logic calls to make sure only json access is minimized. Also, JsonCPP was unbearably slow in debug mode in Windows (simple operations took tens of seconds).

To minimize development time and optimize speed we switch to RapidJSON instead. RapidJSON's advantages compared to jsoncpp (https://github.com/miloyip/nativejson-benchmark):

  • Magnitudes faster, also, its API facilitates writing efficient application code
  • CMake-ified
  • Header-only (no need to install DLLs, ...)
  • More conform to json standard
  • Library is much smaller (31k vs 243k)

Merge request reports

Loading