On 7/22/16 10:07 AM, Steven Schveighoffer wrote:

More info: It's not the json parser.

I parse all the objects to an Appender instead of the stream, and it's
still slow (~2s) when I write the Appender data to the stream. However,
if I just throw away the data from the appender, and then just send
"[]", the time taken is 500ms.

Something in writing the data using the bodyWriter is making this really
really slow.

I'm not sure now whether it's the speed of the translation. I was going
on the timings in firefox.

When I benchmark the actual writing and parsing, D reports 600-700ms.
This seems more reasonable.

I tried wget and the timing goes down to 400ms (on both the server and
for wget). So I think this is an issue of firefox trying to parse the
file mid-stream or something.

Still would be nice to allow putting a range of JSON objects :)

-Steve