Merge lp:~kissiel/checkbox/fix-1392129 into lp:checkbox

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 3405
Merged at revision: 3406
Proposed branch: lp:~kissiel/checkbox/fix-1392129
Merge into: lp:checkbox
Diff against target: 17 lines (+2/-1)
1 file modified
plainbox/plainbox/impl/session/suspend.py (+2/-1)
To merge this branch: bzr merge lp:~kissiel/checkbox/fix-1392129
Reviewer Review Type Date Requested Status
Sylvain Pineau Approve
Review via email: mp+241639@code.launchpad.net

Description of the change

This MR improves the time need when switching to next job

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Really nice optimization, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plainbox/plainbox/impl/session/suspend.py'
2--- plainbox/plainbox/impl/session/suspend.py 2014-11-04 00:18:06 +0000
3+++ plainbox/plainbox/impl/session/suspend.py 2014-11-13 02:04:56 +0000
4@@ -486,11 +486,12 @@
5 The representation of meta-data associated with the session
6 state object.
7 """
8+ id_run_list = frozenset([job.id for job in obj.run_list])
9 return {
10 "jobs": {
11 state.job.id: state.job.checksum
12 for state in obj.job_state_map.values()
13- if not state.result.is_hollow or state.job in obj.run_list
14+ if not state.result.is_hollow or state.job.id in id_run_list
15 },
16 "results": {
17 # Currently we store only one result but we may store

Subscribers

People subscribed via source and target branches