Reduce I/O in build listings by only fetching required columns

Columns such as "longDescription" can be large, so fetching them
when they're not needed is wasteful.
This commit is contained in:
Eelco Dolstra
2012-03-07 22:20:15 +01:00
parent 6526d4a65f
commit 07b3dffd20
6 changed files with 24 additions and 14 deletions

View File

@ -29,7 +29,7 @@ sub overview : Chained('job') PathPart('') Args(0) {
$c->stash->{lastBuilds} =
[ $c->stash->{job}->builds->search({ finished => 1 },
{ order_by => 'timestamp DESC', rows => 10 }) ];
{ order_by => 'timestamp DESC', rows => 10, columns => [@buildListColumns] }) ];
$c->stash->{runningBuilds} = [
$c->stash->{job}->builds->search(