Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better serialization #15

Merged
merged 1 commit into from
Mar 21, 2016
Merged

better serialization #15

merged 1 commit into from
Mar 21, 2016

Conversation

davidmarkclements
Copy link
Member

in our benchmarks there's no real gain or loss, however in terms of functionality we get better serialization of objects when using interpolation - formally any object with a circular reference would result in the whole object being serialized as [Circular]. Now we label circular references properly, but 2x faster than json-stringify-safe (instead using fast-safe-stringify). This is how we end up with roughly the same benchmarks (because we replace json-stringify-safe for pino and use it instead of tryStringify for quick-format).

also log format version (v prop) is bumped since circular reference output is different

benchmarks:

benchPinoMulti_10000: 311.975ms
benchPinoMulti2_10000: 293.021ms
benchPinoInterpolate_10000: 306.162ms
benchPinoInterpolate2_10000: 304.980ms
benchPinoInterpolateAll_10000: 448.825ms
benchPinoInterpolateAll2_10000: 434.358ms
benchPinoInterpolateExtra_10000: 537.417ms
benchPinoInterpolateExtra2_10000: 530.803ms
benchPinoInterpolateDeep_10000: 5872.619ms
benchPinoInterpolateDeep2_10000: 5894.609ms
benchPinoMulti_10000: 287.413ms
benchPinoMulti2_10000: 289.061ms
benchPinoInterpolate_10000: 304.053ms
benchPinoInterpolate2_10000: 300.175ms
benchPinoInterpolateAll_10000: 467.555ms
benchPinoInterpolateAll2_10000: 451.627ms
benchPinoInterpolateExtra_10000: 582.479ms
benchPinoInterpolateExtra2_10000: 572.805ms
benchPinoInterpolateDeep_10000: 5850.142ms
benchPinoInterpolateDeep2_10000: 5877.385ms

davidmarkclements pushed a commit that referenced this pull request Mar 21, 2016
@davidmarkclements davidmarkclements merged commit 9fd3c68 into master Mar 21, 2016
@mcollina
Copy link
Member

@davidmarkclements would you mind adding the releases on the github page, pointing to the relevant PRs that were merged and released?

@davidmarkclements
Copy link
Member Author

done #16

@davidmarkclements davidmarkclements deleted the better-serialization branch March 30, 2016 13:07
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants