Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cylc.network.suite_state: speed up updating #1811

Merged
merged 2 commits into from
Apr 27, 2016

Conversation

benfitzpatrick
Copy link
Contributor

This change roughly halves the cost of updating of suite state summaries, which is our old expensive friend, and (still) usually the dominant cost in an active suite.

Some of the expensive stuff has been moved to a new method, purely for profiling reasons and for later speed ups.

The speed up mostly comes from doing fewer, more targeted loops and from avoiding as many .items() calls, which the profiler alleges to be expensive (may just be profiler overhead - not sure).

@matthewrmshin, @kaday please review.

@benfitzpatrick benfitzpatrick added this to the next-release milestone Apr 26, 2016
ts = task.get_state_summary()
task_summary[task.identity] = ts
name, point_string = TaskID.split(task.identity)
point_string = str(point_string)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this str necessary?

@matthewrmshin
Copy link
Contributor

1 minor comment. Otherwise looks OK. Tests OK (with and without global configuration) in my environment.

@matthewrmshin matthewrmshin assigned kaday and unassigned matthewrmshin Apr 26, 2016
@hjoliver
Copy link
Member

(not for this PR, but I wonder if we could avoid all this by having each task - only when its state changes - update its own small part of the suite state summary).

@kaday
Copy link
Contributor

kaday commented Apr 27, 2016

Looks okay to me. Passes the test battery in my environment.
Waiting for Matt's suggestion to be implemented and then it can be merged.

@kaday kaday assigned benfitzpatrick and unassigned kaday Apr 27, 2016
@benfitzpatrick
Copy link
Contributor Author

OK, removed str call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants