Open lukiano opened 4 years ago
Interesting, would you give it a try in a PR? Maybe a simple benchmark would be also good.
On Thu, 20 Feb 2020, 06:55 Luciano Leggieri, notifications@github.com wrote:
Given that the span model is known, I was wondering if we could use a library like the one mentioned in the title. For those unfamiliar with it, if a javascript object follow a known schema, by passing that schema to the library it will stringify the object much faster than plain JSON.stringify.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openzipkin/zipkin-js/issues/487?email_source=notifications&email_token=AAXOYARQRWXODZC6ZECAFFTRDYLLLA5CNFSM4KYHX3LKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IO4BMTQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXOYAR76FIJ3NWFDDE2DLLRDYLLLANCNFSM4KYHX3LA .
I can try. I have to fetch the actual schema. I have some doubts on what's allowed on a tag.
You can see the specs of the v2 model in https://zipkin.io/zipkin-api/#/default/post_spans.
tags is a map of string key and string value
Currently blocked on https://github.com/fastify/fast-json-stringify/pull/209
Processing the span on line https://github.com/openzipkin/zipkin-js/blob/7039cafbfffe521b0b2a024f50f33e3d47001e9f/packages/zipkin/test/jsonEncoder.JSON_V2.test.js#L50 in a loop 10 million times gives the following results:
Given that the span model is known, I was wondering if we could use a library like the one mentioned in the title. For those unfamiliar with it, if a javascript object follow a known schema, by passing that schema to the library it will stringify the object much faster than plain
JSON.stringify
.