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

task_job_mgr: move compute out of open call #5483

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Apr 24, 2023

Spotted whilst reviewing #5475, writing to the activity log takes ~0.035 seconds per task which is ~8% of the main_loop runtime.

This PR reduces that to ~0.025s (~28% saving), not entirely sure why this is faster, but, meh.

I profiled this with:

# b = 1..100
a => <b> => c

Although you don't need 100 tasks and you could just time the method call.

Before:

Screenshot from 2023-04-24 12-43-38

After:

Screenshot from 2023-04-24 12-43-52

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • CHANGES.md entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@oliver-sanders oliver-sanders added small efficiency For notable efficiency improvements labels Apr 24, 2023
@oliver-sanders oliver-sanders added this to the cylc-8.1.x milestone Apr 24, 2023
@oliver-sanders oliver-sanders self-assigned this Apr 24, 2023
@oliver-sanders oliver-sanders modified the milestones: cylc-8.1.x, cylc-8.1.4 Apr 24, 2023
Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

Somewhat surprising that this makes a difference, but it's nicer this way anyway.

@hjoliver hjoliver merged commit 29b1430 into cylc:8.1.x Apr 25, 2023
@hjoliver hjoliver modified the milestones: cylc-8.1.4, cylc-8.1.3 Apr 25, 2023
@oliver-sanders oliver-sanders deleted the file_open_efficiency branch April 26, 2023 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
efficiency For notable efficiency improvements small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants