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

The run jobs page is slow to respond #3781

Closed
iaindillingham opened this issue Nov 7, 2023 · 4 comments
Closed

The run jobs page is slow to respond #3781

iaindillingham opened this issue Nov 7, 2023 · 4 comments
Assignees

Comments

@iaindillingham
Copy link
Member

The run jobs page is slow to respond. This may be where a study has many actions. For example, long-covid-symptoms/long-covid-symptoms has 200 actions.

Thank you for reporting this, @kevwing.

@ghickman
Copy link
Contributor

ghickman commented Nov 8, 2023

todo:

  • get stats from honeycomb about these pages across various workspaces
  • check if this is related to the extra checks added for codelist rot
  • check honeycomb for the requests made in the background (honeycomb has telemetry for the requests library)

@ghickman
Copy link
Contributor

Locally it takes ~2s for the run jobs page of long-covid-symptoms (the linked workspace) to load with 223 actions. Nearly all of this time is spent in dispatch. The 3 slowest parts of the code, in the order they execute, are:

  1. 0.422s: get project.yaml from GitHub
  2. 0.273s: load (and validate) project.yaml into a Pipeline object
  3. 0.929s: check codelist status

On a page with a much smaller number of actions, such as test-age-distribution which has 3 actions, it takes ~1s to load locally, with those calls from above taking:

  1. 0.312s: get project.yaml from GitHub
  2. 0.012s: load (and validate) project.yaml into a Pipeline object
  3. 0.581s: check codelist status

Not at all a scientific approach (I saw a 300ms variation in opencodelist response time while getting these numbers!), but the smaller number of actions clearly helps with the load_pipeline call.

I think we have 3 options to tackle this:

  1. switch the view to async and wrap up the GitHub and OpenCodelist API calls behind async functions
  2. use a pool of threads/processes/etc to run the API calls
  3. nothing, and accept that this view needs to be rebuilt as a wizard, likely with a react, or similar, front end

@ghickman ghickman self-assigned this Dec 11, 2023
@tomodwyer
Copy link
Member

No current plans to optimise. The job submission flow will eventually be redesigned to fix some of these issues.

@tomodwyer tomodwyer closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants