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

JobResult Page Slow Loading #992

Closed
jvanderaa opened this issue Oct 11, 2021 · 2 comments
Closed

JobResult Page Slow Loading #992

jvanderaa opened this issue Oct 11, 2021 · 2 comments
Labels
type: bug Something isn't working as expected

Comments

@jvanderaa
Copy link
Contributor

Environment

  • Python version: 3.8.10
  • Nautobot version: 1.1.4

Steps to Reproduce

  1. Execute Jobs via Golden Config Plugin, or self written
  2. Navigate to primary JobResult page (Extensibility -> Job Results)
  3. Page takes a long time to load compared to other pages (43 results)

Expected Behavior

Expected the page to load with relative expedience.

Observed Behavior

At least 45 seconds to load, the timer executed was at 50 seconds

@glennmatthews
Copy link
Contributor

Related to #453; the issue is that JobResult log entries are all stored in a single JSON blob within the JobResult, so to summarize the logs for each JobResult in the list view, we have to parse the JSON for each JobResult as part of our rendering logic. When each JobResult has dozens to thousands of log entries in its JSON, this can be very expensive. The most likely fix will be to extract JobResult logs into a separate database model instead of storing them as JSON, which will allow us to summarize the logs with a much quicker simple database call.

@glennmatthews
Copy link
Contributor

Fixed by #1030.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Development

No branches or pull requests

2 participants