Skip to content

perf(@angular-devkit/core): use safe-stable-stringify #22057

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

Closed

Conversation

BridgeAR
Copy link

@BridgeAR BridgeAR commented Nov 2, 2021

Replace fast-json-stable-stringify package with safe-stable-stringify.
This improves the memoize performance and creating virtual ast objects.

fast-json-stable-stringify x 18,765 ops/sec ±0.71% (94 runs sampled)
safe-stable-stringify x 30,367 ops/sec ±0.39% (96 runs sampled)

There are two minor changes to the serialized output: 1. bigint are
from now on serialized as number (this may be deactivated) and 2. the
output for circular references now produces valid json (a string).

@google-cla google-cla bot added the cla: yes label Nov 2, 2021
Replace fast-json-stable-stringify package with safe-stable-stringify.
This improves the memoize performance and creating virtual ast objects.

fast-json-stable-stringify x 18,765 ops/sec ±0.71% (94 runs sampled)
safe-stable-stringify x 30,367 ops/sec ±0.39% (96 runs sampled)

There are two minor changes to the serialized output: 1. bigint are
from now on serialized as number (this may be deactivated) and 2. the
output for circular references now produces valid json (a string).
@BridgeAR BridgeAR force-pushed the switch-to-safe-stable-stringify branch from 066e237 to a5046c1 Compare November 2, 2021 13:27
@alan-agius4
Copy link
Collaborator

Thank you for your contribution. However, we are looking into removing the fast-json-stable-stringify dependency altogether.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 13, 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.

2 participants