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 (community) 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
=== modified file 'plainbox/plainbox/impl/session/suspend.py'
--- plainbox/plainbox/impl/session/suspend.py 2014-11-04 00:18:06 +0000
+++ plainbox/plainbox/impl/session/suspend.py 2014-11-13 02:04:56 +0000
@@ -486,11 +486,12 @@
486 The representation of meta-data associated with the session486 The representation of meta-data associated with the session
487 state object.487 state object.
488 """488 """
489 id_run_list = frozenset([job.id for job in obj.run_list])
489 return {490 return {
490 "jobs": {491 "jobs": {
491 state.job.id: state.job.checksum492 state.job.id: state.job.checksum
492 for state in obj.job_state_map.values()493 for state in obj.job_state_map.values()
493 if not state.result.is_hollow or state.job in obj.run_list494 if not state.result.is_hollow or state.job.id in id_run_list
494 },495 },
495 "results": {496 "results": {
496 # Currently we store only one result but we may store497 # Currently we store only one result but we may store

Subscribers

People subscribed via source and target branches