[Development] State of "binary JSON" in 5.15+?

Stottlemyer, Brett (B.S.) bstottle at ford.com
Wed Apr 14 04:11:51 CEST 2021

On 4/13/21, 5:23 PM, "Development on behalf of Thiago Macieira" <development-bounces at qt-project.org on behalf of thiago.macieira at intel.com> wrote:

    Are you sure you can't just use a memory cache?

    Your requirement sounds that your JSON snippet is small enough that it will
    not hit the 128 MB limit any time soon but large enough that reparsing it is
    not negligible. Is that it?

Yes, small but reparsing isn't negligible.  The idea is to cache (to disk) a number
of files, and when run, the application dynamically picks the right files to use.
I am caching in RAM as well, once the files are parsed, but it is the initial load
time I was trying to reduce.  Or did I misunderstand your suggestion?

On 4/13/21, 3:42 PM, "Mårten Nordheim" <marten.nordheim at qt.io> wrote:

    It's in the qt5compat library ...

Thanks, Mårten.   Unfortunately, I'm still on Qt 5.15 which seems to be
incompatible with that code (crash).  I'm guessing because the QJsonDocument
input/output from the new methods is expecting the Qt6 version of the class.

(which I guess is 5.14 or earlier) looks like it replaces the reparsing with a few
memcpy calls, but that was incompatible with Qt 5.15.  A similar mechanism
is obviously possible with Qt6, given the Qt5compat code.  Is it just Qt 5.15
that is problematic?


More information about the Development mailing list