yada

2017-11-30T19:03:15.000236Z

I have a very big map to transmit to the browser. Is there a way to make use of multiple cores when formatting the data? As it is I have 1 CPU going to 100% for a few seconds...

dominicm 2017-11-30T19:05:04.000564Z

what format are you sending it in?

2017-11-30T19:05:38.000484Z

json

2017-11-30T19:05:51.000239Z

Tho I guess transit is possible

dominicm 2017-11-30T19:06:06.000011Z

I know we have some code written somewhere to stream json

dominicm 2017-11-30T19:06:32.000547Z

cheshire is streaming iirc.

dominicm 2017-11-30T19:06:51.000266Z

I have no idea if yada/json does the right thing here.

2017-11-30T19:06:54.000012Z

Does it mean it would start sending before it completed the formatting?

dominicm 2017-11-30T19:06:59.000071Z

yes

dominicm 2017-11-30T19:07:14.000479Z

I think yada/json is actually wrong here, I remember seeing something and going "wtf? why would it do that!"

2017-11-30T19:07:26.000160Z

Hmm... not multi threaded, but that might be even better.

2017-11-30T19:08:20.000710Z

I mean : I don't know if it's single thread yet, but it would be better than simply doing everything in multiple threads and THEN sending it.

dominicm 2017-11-30T19:10:18.000397Z

I'd benchmark, as it might be the GC killing you or something related to the formatting itself.

dominicm 2017-11-30T19:10:36.000694Z

(loading the whole thing into a string in memory might not be good for example)

2017-11-30T19:10:54.000661Z

for sure

danielcompton 2017-11-30T22:34:09.000379Z

@frozenlock how big are you talking about? 1MB, 10MB, 100MB?

2017-11-30T22:37:44.000092Z

@danielcompton 10-100MB