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

Fixes #16238 - Speed up dashboard loading time. #3764

Closed
wants to merge 1 commit into from

Conversation

ohadlevy
Copy link
Member

I've change report host to inner query and used a join, in
my testing, this speed up dramaticilly dashboard loading
time, on my setup from 60 seconds to under 10 seconds.

I've change report host to inner query and used a join, in
my testing, this speed up dramaticilly dashboard loading
time, on my setup from 60 seconds to under 10 seconds.
@tbrisker
Copy link
Member

Nice catch! Another small change I noticed that might also help would be to change the eager_load to joins here: https://github.com/theforeman/foreman/blob/develop/app/models/host/managed.rb#L82 as I don't think it really makes any sense to use a left join here

@ohadlevy
Copy link
Member Author

@tbrisker not sure, maybe @ares knows why was it initially required?

@ohadlevy
Copy link
Member Author

@tbrisker regardless, I think this one worth merging without host_status optimization since host_status has a wider effect, and might need to refactor the host_status usage from the dashboard vs from host list (for example).

@tbrisker
Copy link
Member

@ohadlevy Very well, opened http://projects.theforeman.org/issues/16245 to take care of too-eager eager-loading.

@tbrisker
Copy link
Member

Merged as 95fd95e, thanks @ohadlevy!

@tbrisker tbrisker closed this Aug 23, 2016
@ares
Copy link
Member

ares commented Aug 23, 2016

I think @dLobatog might know - 7fdb705 there also a good description in the commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants