Fix a huge performance regression in the jobstatus page

[?]
Nov 29, 2011, 6:55 PM
J7EE2XZAB5EZICAZGZ6DKM4JDMH73A5AJIW6INYMWJHENIGVANQAC

Dependencies

  • [2] AH2YD57S * More database hackery.
  • [3] 3EGKZC3C hydra: in jobstatus pages, allow maintainer query argument to show only the packages you are maintaining
  • [4] FN6V3C7M always show latest 10 builds on job page
  • [5] JXPHAZMV Minor style changes
  • [6] T6KISLR6 Fix indentation
  • [7] PCZHB5JU * Remove trailing whitespace.
  • [8] XHK7IGYI * hdyra: show last succeeded build and changes since on build status summary if build has failed
  • [9] 3HZY24CX * Make jobsets viewable under
  • [10] S6OISBQ3 * Mark the "current" builds in a jobset, i.e. those corresponding to
  • [11] 2PEN43XF Hydra/40: Last 5 builds on job page incorrect
  • [12] AVOPQAF7 * Make the "all" page faster by not doing four identical `select
  • [13] HUH62VDL show current builds on job page
  • [14] CVWQXYKM use newer icons consistently
  • [15] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [16] SJN2QPWH * Big speed-up of the job status page and the channel generation (such
  • [17] ZI535LI6 * hydra: 'new' UI for project/jobset/job/build
  • [18] RH2BAJ6K fix annoying behaviour in webkit browsers when middle-clicking (open in new tab) on a build, it used to open the build both in new tab as current tab
  • [19] JLDUSNUO * Unify rendering of finished and scheduled builds.
  • [20] BTUDUY6F * Provide some redirects to the latest successful build for a job (or
  • [21] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [22] T2232OBS * Add some DB indices to make the /releases page much faster.
  • [23] 777XFGVY Hydra/22: on job page, 'finished builds' shows nothing for old (non-current) jobs
  • [24] RAKTHYAI * In the job status and error pages, show when the status of a job
  • [25] 4S4ZMFJK * Links on trs.
  • [26] AKAXJDMW * Disable the statistics on the project, jobset and job pages for now
  • [*] DEMSSSB2 * Controller for jobs which inherits all actions in ListBuilds. So
  • [*] IK53RV4V

Change contents

  • replacement in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 19
    [3.149][7.615:741](),[7.615][7.615:741]()
    { '+select' => ["me.statusChangeId", "me.statusChangeTime"]
    , '+as' => ["statusChangeId", "statusChangeTime"]
    [3.149]
    [2.0]
    { '+select' => ["me.statusChangeId", "me.statusChangeTime", "resultInfo.buildStatus"]
    , '+as' => ["statusChangeId", "statusChangeTime", "buildStatus"]
  • replacement in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 67
    [7.823][7.64:147]()
    $c->stash->{builds} = [joinWithResultInfo($c, $c->stash->{allBuilds})->search(
    [7.823]
    [7.114]
    $c->stash->{builds} = [ joinWithResultInfo($c, $c->stash->{allBuilds})->search(
  • replacement in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 69
    [7.141][7.148:187]()
    { order_by => "timestamp DESC"
    [7.141]
    [7.337]
    { '+select' => ["resultInfo.buildStatus"]
    , '+as' => ["buildStatus"]
    , order_by => "timestamp DESC"
  • replacement in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 73
    [7.371][7.371:400]()
    , page => $page })];
    [7.371]
    [7.981]
    , page => $page }) ];
  • replacement in src/lib/Hydra/Controller/Job.pm at line 28
    [7.1145][7.0:329]()
    $c->stash->{currentBuilds} = [$c->stash->{job}->builds->search({iscurrent => 1}, { join => 'resultInfo', '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
    , '+as' => ["releasename", "buildstatus"], order_by => 'system' })];
    [7.1145]
    [7.0]
    $c->stash->{currentBuilds} = [$c->stash->{job}->builds->search({iscurrent => 1}, { join => 'resultInfo', '+select' => ["resultInfo.releasename", "resultInfo.buildStatus"]
    , '+as' => ["releasename", "buildStatus"], order_by => 'system' })];
  • replacement in src/lib/Hydra/Controller/Job.pm at line 31
    [7.1][7.0:173](),[7.173][4.0:179]()
    $c->stash->{lastBuilds} = [$c->stash->{job}->builds->search({ finished => 1 }, { join => 'resultInfo', '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
    , '+as' => ["releasename", "buildstatus"], order_by => 'timestamp DESC', rows => 10 })];
    [7.1]
    [7.328]
    $c->stash->{lastBuilds} =
    [ $c->stash->{job}->builds->search({ finished => 1 },
    { join => 'resultInfo',
    , '+select' => ["resultInfo.releasename", "resultInfo.buildStatus"]
    , '+as' => ["releasename", "buildStatus"]
    , order_by => 'timestamp DESC', rows => 10
    }) ];
  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 85
    [5.376][5.376:483]()
    [ joinWithResultInfo($c, $tmp)->search({ finished => 1 }, { order_by => "timestamp DESC", rows => 5 }) ];
    [5.376]
    [7.819]
    [ joinWithResultInfo($c, $tmp)->search({ finished => 1 },
    { order_by => "timestamp DESC", rows => 5
    , '+select' => ["resultInfo.buildStatus"]
    , '+as' => ["buildStatus"]
    }) ];
  • replacement in src/root/common.tt at line 103
    [7.1290][7.0:58]()
    [% INCLUDE renderBuildStatusIcon size=16 %]
    [7.1290]
    [6.0]
    [% INCLUDE renderBuildStatusIcon size=16 busy=(showSchedulingInfo ? 1 : 0) buildstatus=build.get_column('buildStatus') %]
  • replacement in src/root/common.tt at line 206
    [7.14644][7.14644:14680](),[7.14680][6.19:138]()
    [% BLOCK renderBuildStatusIcon; %]
    [% finished = build != undef ? build.finished : 1 %]
    [% busy = build != undef ? build.schedulingInfo.busy : 0 %]
    [7.14644]
    [6.138]
    [% BLOCK renderBuildStatusIcon %]
    [% finished = build != undef ? build.finished : 1 %]
    [% busy = busy != undef ? busy : build.schedulingInfo.busy %]
  • replacement in src/root/common.tt at line 233
    [7.15729][7.15729:15756]()
    [% BLOCK renderStatus; %]
    [7.15729]
    [6.1171]
    [% BLOCK renderStatus %]
  • edit in src/root/common.tt at line 235
    [6.1197]
    [6.1197]
    [% INCLUDE renderBuildStatusIcon size=16 %]
  • edit in src/root/common.tt at line 237
    [6.1244][6.1244:1294]()
    [% INCLUDE renderBuildStatusIcon size=16 %]
  • edit in src/root/common.tt at line 239
    [6.1375][6.1375:1425]()
    [% INCLUDE renderBuildStatusIcon size=16 %]
  • edit in src/root/common.tt at line 241
    [6.1544][6.1544:1594]()
    [% INCLUDE renderBuildStatusIcon size=16 %]
  • edit in src/root/common.tt at line 243
    [6.1710][6.1710:1760]()
    [% INCLUDE renderBuildStatusIcon size=16 %]
  • edit in src/root/common.tt at line 245
    [6.1861][6.1861:1911]()
    [% INCLUDE renderBuildStatusIcon size=16 %]
  • edit in src/root/common.tt at line 249
    [6.2243][6.2243:2293]()
    [% INCLUDE renderBuildStatusIcon size=16 %]
  • edit in src/root/common.tt at line 251
    [6.2368][6.2368:2418]()
    [% INCLUDE renderBuildStatusIcon size=16 %]