You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When editing a host that is using Proxmox in Foreman it takes a long time for the edit pages to render. Currently on one of my Proxmox clusters it takes around 30 seconds.
To Reproduce
Steps to reproduce the behavior:
Go to Host
Click on 'Edit'
Wait....
Expected behavior
Get to screen very quickly
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: RHEL 9.5
Browser chrome
Smartphone (please complete the following information):
Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
I have tracked down the issue to the app/views/compute_resources_vms/form/proxmox/_base.html.erb template. In particular the "react_component('ProxmoxVmType', { " function and it's use of to_json. Basically the entire configuration from every proxmox node is sent thru this function call and it takes about 30 seconds in my current environment to convert to json. Current cluster is 8 nodes and around 100 VMs. One of the largest parts of the nodes is every backup image is listed in the config as well. My debugging has shown on my cluster that when you render _base.html.erb we are converting around 6,000 Fog::Proxmox::Compute objects to json.
While the biggest culprit in this is the nodes hash, there are others that are very large and not sure have any place being used in editing a VMs configuration. I've been trying to figure out how to make these smaller, but, I'm still very weak on how all this is setup and hoping someone has a quick "oh, I know the quick fix" for this.
The text was updated successfully, but these errors were encountered:
Describe the bug
When editing a host that is using Proxmox in Foreman it takes a long time for the edit pages to render. Currently on one of my Proxmox clusters it takes around 30 seconds.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Get to screen very quickly
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
I have tracked down the issue to the app/views/compute_resources_vms/form/proxmox/_base.html.erb template. In particular the "react_component('ProxmoxVmType', { " function and it's use of to_json. Basically the entire configuration from every proxmox node is sent thru this function call and it takes about 30 seconds in my current environment to convert to json. Current cluster is 8 nodes and around 100 VMs. One of the largest parts of the nodes is every backup image is listed in the config as well. My debugging has shown on my cluster that when you render _base.html.erb we are converting around 6,000 Fog::Proxmox::Compute objects to json.
From debug logs:
2025-02-04T16:11:02 [D|app|a71008da] Rendered foreman_fog_proxmox/app/views/compute_resources_vms/form/proxmox/_base.html.erb (Duration: 24760.8ms | Allocations: 1900437)
While the biggest culprit in this is the nodes hash, there are others that are very large and not sure have any place being used in editing a VMs configuration. I've been trying to figure out how to make these smaller, but, I'm still very weak on how all this is setup and hoping someone has a quick "oh, I know the quick fix" for this.
The text was updated successfully, but these errors were encountered: