You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking for a fast way to serialize and deserialize my JSON from and to objects. I used the TJSON Class from Delphi for that, but when it comes to more data, it gets very slow. I tested a bit and wanted to share my results for everyone who is interested:
JSON object with 100,000 elements in an array. The class inherits from a main class, so the JSON is not extra simple but could also be more complex.
Test on Windows 32 Bit
Serialization
TJSON = 2885 ms
Quicklib = 779 ms
Neon = 1064 ms
Deserialization
TJSON = 15987 ms
Quicklib = 2104 ms
Neon = 1214 ms
Test on Windows 64 Bit
Serialization
TJSON = 2427 ms
Quicklib = 854 ms
Neon = 1009 ms
Deserialization
TJSON = 10575 ms
Quicklib = 2164 ms
Neon = 1244 ms
Test on Android Pixel 7a
Serialization
TJSON = 10450 ms
Quicklib = 3036 ms
Neon = 4016 ms
Deserialization
TJSON = 59530 ms (~1min 😮)
Quicklib = 8240 ms
Neon = 5312 ms
As you can see, on serialization, Quicklib is a bit faster than Neon (~20%), while on deserialization, Neon is faster than Quicklib (~40%). Unfortunately, I was not able to get mORMot2 to run under Mobile. The performance of mORMot2 under Windows was breathtaking: 55ms for deserialization.
But in my opinion, Neon has some more benefits in comparison to the other frameworks:
There is not much extra code that has to be added into the project.
The syntax is nearly identical to TJSON, so you just have to replace TJSON with TNeon, add Neon.Core.Persistence.Json to the uses, and you're good to go.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm looking for a fast way to serialize and deserialize my JSON from and to objects. I used the TJSON Class from Delphi for that, but when it comes to more data, it gets very slow. I tested a bit and wanted to share my results for everyone who is interested:
JSON object with 100,000 elements in an array. The class inherits from a main class, so the JSON is not extra simple but could also be more complex.
Test on Windows 32 Bit
Serialization
Deserialization
Test on Windows 64 Bit
Serialization
Deserialization
Test on Android Pixel 7a
Serialization
Deserialization
As you can see, on serialization, Quicklib is a bit faster than Neon (~20%), while on deserialization, Neon is faster than Quicklib (~40%). Unfortunately, I was not able to get mORMot2 to run under Mobile. The performance of mORMot2 under Windows was breathtaking: 55ms for deserialization.
But in my opinion, Neon has some more benefits in comparison to the other frameworks:
Beta Was this translation helpful? Give feedback.
All reactions