On 4/13/21, 5:23 PM, "Development on behalf of Thiago Macieira" 
<[email protected] on behalf of [email protected]> 
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" <[email protected]> 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.

https://code.woboq.org/qt5/qtbase/src/corelib/serialization/qjsondocument.cpp.html#_ZN13QJsonDocument14fromBinaryDataERK10QByteArrayNS_14DataValidationE
(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?

Thanks,
Brett

_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to