Lix Development | 409 Members | |
| (Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel. | 135 Servers |
| Sender | Message | Time |
|---|---|---|
| 10 Dec 2025 | ||
In reply to @rosssmyth:matrix.orgnarrator voice indeed it is really messed up | 16:34:30 | |
| Due to unfortunate design decisions made (or rather, not made) back when I was in Kindergarten, parsing is on the critical path for evaluation time | 16:35:23 | |
| amazing | 16:35:33 | |
| If you want the highest performance possible, larlpop will be hard to beat. But recovery is bad so it would be difficult to get good diagnostics out of it. | 16:43:50 | |
| what is the process if we need to do a backport of a patch (or other proposals of how to handle this one) this as nixpkgs mdbook 0.5.0 update depends on https://gerrit.lix.systems/c/lix/+/4653 being in see https://github.com/NixOS/nixpkgs/pull/462777#issuecomment-3637993347 & https://github.com/NixOS/nixpkgs/pull/467009 | 16:50:39 | |
In reply to @piegames:flausch.socialsomething something C++ parsing… | 17:18:05 | |
| that too, but that's not even what I meant | 17:18:20 | |
In reply to @piegames:flausch.socialIs that because parsing is so unbearably slow, or is there a more cursed reason? | 17:18:25 | |
In reply to @piegames:flausch.socialwe would like to see benchmarks on this… we'd honestly sooner suspect filesystem IO as a bottleneck over parse-time | 17:18:48 | |
In reply to @piegames:flausch.social* we would like to see benchmarks/profiles on this… we'd honestly sooner suspect filesystem IO as a bottleneck over parse-time | 17:19:17 | |
| (having looked at profiles of eval before, but not in a while) | 17:19:29 | |
| no, parsing is super fast, mostly thanks to horrors, it's just that Nixpkgs is 3.6MLOC over 40k files and every single NixOS eval loads a good chunk of that, realistically multiple times. The main issue is that caching was never a thought in the architecture and adding it afterwards is really tricky | 17:21:27 | |
| don't forget that every single Nixpkgs package loads hundreds if not thousands of other nix files | 17:22:24 | |
yes, we're close enough to that atm, there still is one full AST walk for bindVars that's still costly (I tried to remove it with horrors but unexplicably did not make anything faster) and general AST allocation cost (more bump allocators would help a lot there probably) | 17:22:40 | |
In reply to @qyriad:katesiria.org(and instantiates half a gazillion derivations…) | 17:22:52 | |
| we won't get much faster than that (though I expect that a parse that can directly emit Bytecode should be a little bit faster still because more compact representation), but the Rust rewrite still needs to be at least as fast as now and that's no small feat | 17:23:20 | |
| * we won't get much faster than that (though I expect that a parser that can directly emit Bytecode should be a little bit faster still because more compact representation), but the Rust rewrite still needs to be at least as fast as now and that's no small feat | 17:23:45 | |
In reply to @piegames:flausch.socialCould the rust version be possibly be writtten with cache in mind from the beginning? | 17:25:15 | |
| yes, but the issue is, what is your cache key? | 17:25:37 | |
| inode number and ctime might be our best bet | 17:28:31 | |
| but in terms of cachable data structures, bytecode gives us that for free | 17:29:02 | |
| * but in terms of cachable data structures, bytecode gives us that bit for free | 17:29:28 | |
In reply to @piegames:flausch.socialWhat do other interpreters do? | 17:31:54 | |
| I don't think any other interpreters have comparable performance requirements for parsing | 17:33:30 | |
| if there constraints weren't as tight we could just go content-addressed and use a hash | 17:33:43 | |
| bytecode is our::Qyriad's long term goal | 17:35:18 | |
| or really whenever someone pays us for it | 17:35:25 | |
| * or whenever someone pays us for it | 17:35:36 | |
| I think browser engines have sufficient control over their baseline caching pipelines and what data changes when that they can probably just track what changes easily, but I'm guessing here | 17:36:08 | |
In reply to @piegames:flausch.socialI don't know how many of those lines are going to be actually parsed (now I wish I could somehow learn that into), but assuming 20% utilization (that doesn't sound too unreasonable, considering that my desktop has 2k packages, but there's a lot of re-evals due to module system, splicing, package variations etc.), that doesn't sound too terrible? Like, other interpreters and compilers probably deal with 700k LOC codebases. How do they deal with that? | 17:36:40 | |