[fpc-pascal] Improved FPC JSON-RPC support
Graeme Geldenhuys
mailinglists at geldenhuys.co.uk
Wed Dec 29 14:56:32 CET 2021
On 2021-12-29 09:54, Michael Van Canneyt via fpc-pascal wrote:
> They showed clearly that the used protocol (http & xml) is the largest
> factor.
> in 2013 I did many tests in a JSON REST framework: the times for
> streaming were dwarfed by the time spent on network & database access.
Have you, or anybody else, ever done some benchmarks to see how
"expensive" in CPU time it is to parse the exact same data in XML format
vs JSON format?
I couldn't find FPC specific benchmarks, but did a basic Firefox v95.0.2
browser Network tests (with caching disabled). A 54KB JSON file vs a
121KB XML file, which represents the exact same 1000 rows of a database
table. Interestingly (and surprising to me), Firefox managed to load the
XML in about half the time (172ms) compared to the JSON (386ms) file. I
did the load test multiple times, and the results were consistent.
Regards,
Graeme
More information about the fpc-pascal
mailing list