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

[?]
Mar 7, 2012, 9:20 PM
N45RZUQ6E7XXUPVWMR2SSZZB57ZD236PEMBCCOCAQOUOYFVJDBXQC

Dependencies

  • [2] 3Y7AFJSS * Support linking to the latest job in a view for a specific platform, e.g.
  • [3] ONGLIFOY allow _'s in first character of filenames
  • [4] HPEG2RHV Merge the BuildResultInfo table into the Builds table
  • [5] 777XFGVY Hydra/22: on job page, 'finished builds' shows nothing for old (non-current) jobs
  • [6] JXPHAZMV Minor style changes
  • [7] S66BOMVU * Added authentication.
  • [8] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [9] 5NO7NCKT * Refactoring.
  • [10] 3HZY24CX * Make jobsets viewable under
  • [11] LVJKRTIK * Generate a Nix expression for the channel.
  • [12] U7G4EEQC
  • [13] WRIU3S5E * UI for cloning builds (not functional yet).
  • [14] MVB7RRLT * Move NARs from the NixChannel controller to the Root controller and
  • [15] MOX7XJ2E Merge the BuildSchedulingInfo table into the Builds table
  • [16] A52HEFHQ * Allow builds to be restarted (if they failed with a transient error,
  • [17] BHZXGT2H * Channels: provide an index page that lists all the packages in the
  • [18] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [19] CS7T2XFI
  • [20] SJN2QPWH * Big speed-up of the job status page and the channel generation (such
  • [21] J7EE2XZA Fix a huge performance regression in the jobstatus page
  • [22] ZRBXLKFO
  • [23] 7UJ5YV4V * Provide a channel for each project containing all the latest
  • [24] QMPX3JDF * hydra: show queue optimization
  • [25] G5ZR3ZVZ hydra: put contents links into html, add links to files from contents page
  • [26] JLDUSNUO * Unify rendering of finished and scheduled builds.
  • [*] T2232OBS * Add some DB indices to make the /releases page much faster.
  • [*] DEMSSSB2 * Controller for jobs which inherits all actions in ListBuilds. So
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] QTFVCDIF added hide feature for project/jobset

Change contents

  • edit in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 68
    [4.351]
    [28.337]
    , columns => [@buildListColumns]
  • replacement in src/lib/Hydra/Base/Controller/NixChannel.pm at line 54
    [5.78][5.324:389]()
    return $build->get_column('releasename') || $build->nixname;
    [5.78]
    [5.0]
    return $build->releasename || $build->nixname;
  • replacement in src/lib/Hydra/Base/Controller/NixChannel.pm at line 59
    [5.19][5.19:55]()
    # Sort by name, then timestamp.
    [5.19]
    [5.55]
    # Sort by name, then id.
  • replacement in src/lib/Hydra/Base/Controller/NixChannel.pm at line 62
    [5.127][5.127:204]()
    or $a->{build}->timestamp <=> $b->{build}->timestamp
    } @_;
    [5.127]
    [5.451]
    or $a->{build}->id <=> $b->{build}->id } @_;
  • replacement in src/lib/Hydra/Controller/Job.pm at line 32
    [5.826][4.3568:3622]()
    { order_by => 'timestamp DESC', rows => 10 }) ];
    [5.826]
    [5.328]
    { order_by => 'timestamp DESC', rows => 10, columns => [@buildListColumns] }) ];
  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 86
    [4.4133][4.4133:4193]()
    { order_by => "timestamp DESC", rows => 5 }) ];
    [4.4133]
    [5.819]
    { order_by => "timestamp DESC", rows => 5, columns => [@buildListColumns] }) ];
  • replacement in src/lib/Hydra/Controller/Root.pm at line 77
    [5.200][5.2669:2822]()
    {finished => 0}, {join => ['project'] , order_by => ["priority DESC", "timestamp"], '+select' => ['project.enabled'], '+as' => ['enabled'] })];
    [5.200]
    [5.558]
    {finished => 0}, { join => ['project'], order_by => ["priority DESC", "timestamp"], columns => [@buildListColumns], '+select' => ['project.enabled'], '+as' => ['enabled'] })];
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 16
    [2.748]
    [5.180]
    @buildListColumns
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 18
    [5.183]
    [31.3595]
    # Columns from the Builds table needed to render build lists.
    Readonly our @buildListColumns => ('id', 'finished', 'timestamp', 'project', 'jobset', 'job', 'nixname', 'system', 'priority', 'busy', 'buildstatus', 'releasename');
  • replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 105
    [5.1999][4.5060:5186]()
    my @builds2 = $builds->search_literal("exists (select 1 from buildproducts where build = me.id and type = 'nix-build')");
    [5.1999]
    [5.673]
    my @builds2 = $builds
    ->search_literal("exists (select 1 from buildproducts where build = me.id and type = 'nix-build')")
    ->search({}, { columns => [@buildListColumns, 'drvpath', 'outpath', 'description', 'homepage'] });
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 153
    [5.1331]
    [5.1331]
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 161
    [32.1954]
    [5.1333]
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 177
    [32.2097]
    [32.2097]
  • replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 203
    [5.218][3.0:79](),[3.79][5.10487:10770](),[5.517][5.10487:10770](),[5.294][5.10487:10770](),[5.10770][2.749:814]()
    Readonly::Scalar our $pathCompRE => "(?:[A-Za-z0-9-\+\._][A-Za-z0-9-\+\._]*)";
    Readonly::Scalar our $relPathRE => "(?:$pathCompRE(?:/$pathCompRE)*)";
    Readonly::Scalar our $relNameRE => "(?:[A-Za-z0-9-][A-Za-z0-9-\.]*)";
    Readonly::Scalar our $attrNameRE => "(?:[A-Za-z_][A-Za-z0-9_]*)";
    Readonly::Scalar our $jobNameRE => "(?:$attrNameRE(?:\\.$attrNameRE)*)";
    Readonly::Scalar our $systemRE => "(?:[a-z0-9_]+-[a-z0-9_]+)";
    [5.218]
    [5.367]
    Readonly our $pathCompRE => "(?:[A-Za-z0-9-\+\._][A-Za-z0-9-\+\._]*)";
    Readonly our $relPathRE => "(?:$pathCompRE(?:/$pathCompRE)*)";
    Readonly our $relNameRE => "(?:[A-Za-z0-9-][A-Za-z0-9-\.]*)";
    Readonly our $attrNameRE => "(?:[A-Za-z_][A-Za-z0-9_]*)";
    Readonly our $jobNameRE => "(?:$attrNameRE(?:\\.$attrNameRE)*)";
    Readonly our $systemRE => "(?:[a-z0-9_]+-[a-z0-9_]+)";