-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Hi,
while testing I did some measurement to find out why communication is so slow.
I figured out that the problem is related to JSON cause delphi's json implemation is using strings (copy) everywhere, that's the main problem.
After changing code using JsonDataObjects (https://github.com/ahausladen/JsonDataObjects) json part is runing up to 20 times (!!!) faster.
You should test and think about if it would be an option to use alternate framework or maybe directly integrate on \dist.
regards,
peter
internal note:
seems like delay on processing is related to object overhead on client side
=> BASE64 decode encode is very fast
=> writing Json is very fast
=> But reading json (json.parse) takes most of that time (23ms for 200kb JSON), when trying to process bigger JSON time is exploding
why? very bad implementation, working with strings everywhere instead of pchar, complex object structure.
replacement: https://github.com/ahausladen/JsonDataObjects recommended, looks like it is reading same json 20 times faster...