Hacker News new | past | comments | ask | show | jobs | submit login

jsonnet seemed like a great idea to me, but I've experienced extremely low performance. My Kubernetes manifest with a couple hundred lines of code in 4 files, which rendered instantly in Python before and renders instantly now with Helm, would take 10-20s with jsonnet. The "lazy evaluation" would probably go into some quadratic or exponential behavior, evaluating the same thing many times, but I sure couldn't see why (it was very straightforward code) or where (no debug tools...).

I really wouldn't use it for anything until tooling improves (but then against I'd much rather use something like Starlark).




> jsonnet seemed like a great idea to me, but I've experienced extremely low performance.

Although each implementation of jsonnet has some quirks, take a look at sjsonnet^1 (scala-based) or go-jsonnet^2 for improved performance. We generally prefer go-jsonnet.

There's also a Rust version^3 that claims to be the fastest yet^4, but I haven't experimented with it at all.

[1]: https://github.com/databricks/sjsonnet

[2]: https://github.com/google/go-jsonnet/

[3]: https://github.com/CertainLach/jrsonnet

[4]: https://gist.github.com/CertainLach/5770d7ad4836066f8e0bd91e...


14s to 2s, pretty large improvement! Thanks for the recommendation.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: