Closed azuwis closed 5 months ago
Yeah, I can reproduce slow times with those examples. I'll take a look.
I'd expect more time due to building the overlay, but that should not take that long.
I've pushed commits that speed up evaluation. The largest portion of time was taken by the autodetection of the default package's name, which now should be much faster for most cases.
On my machine, the recent commits bring the measured time of your command down from 15s to around 2s.
Thanks for the report! Since the speed is now reasonable, and I've exhausted the obvious optimizations, I'll close this issue. Feel free to re-open if there is still an issue, or more optimization suggestions.
I tried flakelight today, and notice eval is very slow.
Write a small demo to show it.
pure nixpkgs:
flake-parts:
flakelight:
flakelight take 20s for a simple demo, 10 times slower compared to pure nixpkgs and flake-parts.
All use some nixpkgs version github:NixOS/nixpkgs/cfc3698c31b1fb9cdcf10f36c9643460264d0ca8.
nix-info -m
"aarch64-darwin"
Darwin 23.2.0, macOS 14.2.1
yes
no
nix-env (Nix) 2.18.1
""
""
/etc/nix/inputs/nixpkgs