~blue-shell/blue-shell/baloo

Viewing all changes in revision 1420.

  • Committer: Stefan Brüns
  • Date: 2018-12-02 20:00:50 UTC
  • Revision ID: git-v1:b891716d336ac8ee10f6631c1a2c68e246a87255
Use Compact json formatting for storing document metadata

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}

Reviewers: #baloo, #frameworks, astippich, ngraham

Reviewed By: #baloo, astippich, ngraham

Subscribers: kde-frameworks-devel

Tags: #frameworks, #baloo

Differential Revision: https://phabricator.kde.org/D17313

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: