Description
I'm migratinga project from qt4 to qt5, in qt4 I use this library for json serializazion/deserialization:
https://github.com/gaudecker/qt-json
now if I create a big variant map with something with 100.000 values, serialization in qt4 with the above library take about 400 ms and parsing less than 300 ms, using qt5 json parse about 800 ms are needed for serialization and more than 1 second for parsing, this is really slow!
Here is the code I used for my tests:
qtjson version:
QByteArray json = QtJson::serialize(testMap);
QtJson::parse(json).toMap();
qt5 version:
QJsonDocument doc = QJsonDocument::fromVariant(testMap);
QByteArray json = doc.toJson(QJsonDocument::Compact);
QJsonDocument::fromJson(json).toVariant().toMap();
is there something wrong in my code or is qt5 json really that slow?