Speed up channel processing
In particular the /pkg action is now O(lg n) instead of O(n) in the number of packages in the channel, and listing the channel contents no longer requires calling isValidPath() on all packages. Derivations (and thus build time dependencies) are no longer included in the channel, because they're not GC roots. Thus they could disappear unexpectedly.
This commit is contained in:
@ -370,10 +370,7 @@ sub nix : Chained('build') PathPart('nix') CaptureArgs(0) {
|
||||
notFound($c, "Path " . $build->outpath . " is no longer available.")
|
||||
unless isValidPath($build->outpath);
|
||||
|
||||
$c->stash->{storePaths} = [$build->outpath];
|
||||
|
||||
my $pkgName = $build->nixname . "-" . $build->system;
|
||||
$c->stash->{nixPkgs} = {"${pkgName}.nixpkg" => {build => $build, name => $pkgName}};
|
||||
$c->stash->{channelBuilds} = $c->model('DB::Builds')->search({id => $build->id});
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user