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

Evaluation time is exponential w.r.t. the depth of the dependency graph #136

Open
BurNiinTRee opened this issue Sep 13, 2023 · 1 comment
Labels
bug Something isn't working future

Comments

@BurNiinTRee
Copy link
Contributor

In particular the size of the nickel-res.json derivation. This gist contains code for the following dependency graph with variable depth, both created with native nix and organist. Evaluation of former seems to have the expected linear complexity, while for the one created with organist, it has exponential complexity.

This seems inevitable when we're passing the dependency graph from nickel to nix by serializing it to a tree with nickel export.

graph-for-nickel

@thufschmitt
Copy link
Member

That's indeed a limiting factor for scalability. There's some work on the Nickel side to add some experimental support for directly calling Nix from Nickel (though it's not good-enough for our use-case yet), that plus RFC 92 could hopefully sidestep this problem altogether eventually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working future
Projects
None yet
Development

No branches or pull requests

2 participants