D17313: Use Compact json formatting for storing document metadata

Stefan BrĂ¼ns noreply at phabricator.kde.org
Sun Dec 2 15:40:29 GMT 2018


bruns created this revision.
bruns added reviewers: Baloo, Frameworks, astippich, ngraham.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.

REVISION SUMMARY
  Document metadata is stored json encoded in the documentdatadb for fast
  retrieval. The default pretty-printed format adds useless whitespace:
  
  $> mdb_dump -p   -s documentdatadb  -n  ~/.local/share/baloo/index
  {\0a    "26": 3648,\0a    "27": 5472,\0a    "30": "Canon",\0a
  
    "31": "Canon EOS 70D",\0a    "32": "2017-11-12T17:42:35.000Z",\0a
    "33": 1,\0a    "34": 9,\0a
    "35": [\0a        3648,\0a        5472\0a    ],\0a
    "37": "2017-11-11T16:54:57.000Z",\0a    "38": 50,\0a
    "40": 0.01666666753590107,\0a    "41": 3.200000047683716,\0a
    "42": 3.375,\0a    "43": 0,\0a    "44": 0,\0a    "45": 5,\0a
    "46": 800\0a}\0a
  
  Using the Compact encoding reduces the storage size significantly:
  {"26":3648,"27":5472,"30":"Canon","31":"Canon EOS 70D",
  "32":"2017-11-12T17:42:35.000Z","33":1,"34":9,"35":[3648,5472],
  "37":"2017-11-11T16:54:57.000Z","38":50,"40":0.01666666753590107,
  "41":3.200000047683716,"42":3.375,"43":0,"44":0,"45":5,"46":800}

REPOSITORY
  R293 Baloo

BRANCH
  submit

REVISION DETAIL
  https://phabricator.kde.org/D17313

AFFECTED FILES
  src/file/extractor/result.cpp

To: bruns, #baloo, #frameworks, astippich, ngraham
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181202/11329b25/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list