-
Notifications
You must be signed in to change notification settings - Fork 70
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
Load Lans efficiently in ProvisionWorkflow #249
Load Lans efficiently in ProvisionWorkflow #249
Conversation
36bafd8
to
0164087
Compare
0164087
to
69673af
Compare
Instead of preloading Lan records, splitting them up based on if they are shareable and instantiating entire ActiveRecord instances to only use the name column in a hash, use a specific query to gather and filter those values and generate a hash from that.
Checked commit NickLaMuro@69673af with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NickLaMuro - LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay. removed a to_miq_q
AND the sharable
to the query.
…n_virt_workflow Load Lans efficiently in ProvisionWorkflow
[Changelog] Update for Sprint 79
Instead of preloading Lan records, splitting them up based on if they are shareable and instantiating entire
ActiveRecord
instances to only use the name column in a hash, use a specific query to gather and filter those values and generate a hash from that.IMPORTANT NOTE: There will be a PR on
ManageIQ/manageiq
that will remove the preloading inapp/models/miq_provision_virt_workflow.rb
that this relied on to avoid an N+1. The idea is that we would merge any provider PRs first, and then the fix in the main repo so the performance impact during this is minimal.Benchmarks
Since this is part of a multi-PR fix, benchmarks will be displayed in the main PR in the
ManageIQ/manageiq
repo. Links to the related PRs will be posted down below when available.Links