google / google/jsonnet

std.manifestYamlDoc(object, quote_keys=false) is slow

Open
#1,019 3 comments 0 reactions 0 assignees View on GitHub
performance
Dominant language
Jsonnet
Stars
7.6k
Forks
475
PR merge metrics
No merged PRs in 30d

Description

When passing `quote_keys=false` to the method `std.manifestYamlDoc` it becomes really slow. Seems like the method checks if the key is safe to use without escaping. Uses the `bareSafe` method. This takes a lot of time.

Maybe the documentation should be updated to warn the users about it? Or the performance could be improved somehow. Or maybe let the users use force invalid keys without checking to lessen the performance hit?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.