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
GoldenConfigListView does not scale well with N GoldenConfigSettings objects #270
Comments
Query for first objserved issue
|
Query for second observed issue
|
The reason that the device model view approach was used was since it was confusing to users when they were changing the "in scope" to not be reflected. It would seem that feature plus the multiple repo feature combined caused this. That being said, will have to investigate options that will be least impactful. Not only for performance but for changing functionality. |
Would it be possible to do a staggered refresh of repos in controlled manner and do a single device refresh when done on-demand? I doubt users back up their devices every hour... Might be that I do not have enough exposure to say. |
Can you please run this and the other query from a This seems like an indexing problem to me so we should rule that out. |
Thanks @jathanism!! I suspect there is a solution here, I just don't know all of the alternates. I have asked @mzbroch to take a look as well. |
|
I think we arrived at a pretty highly optimized implementation here by constructing the |
…s and queryset annotation. (nautobot#277) * Optimize query generation using dictionary merges and queryset annotation. (nautobot#277)
Environment
When navigating to
/plugins/golden-config/golden/
the load time can exceed default timeouts for NGINX proxy of 60 seconds causing a 504 gateway timeout.Steps to Reproduce
/plugins/golden-config/golden/
Expected Behavior
Table view loads within a reasonable amount of time
Observed Behavior
504 gateway timeout.
Observed Issue
Two issues have been discovered.
OR
in the SQL query caused by joining a queryset in a for loop. (querysets are lazy and are only executed when they are needed/evaluated). Caused by. This scale exponentiallyProposed Change
Move the view to be based directly on the GoldenConfig model and not filtered Devices via the GoldenConfigSettings. This would also limit this table view to ONLY devices that a job has been run against them in the plugin and exclude devices that MAY be in scope but have not had a job run against them.
The text was updated successfully, but these errors were encountered: