With few thousands of subnets and domains, some pages in Foreman takes a lot of time to render.
After some investigation I found that the problem is JS functions for
multi-select component, where the functions goes over all the records and format them for the multi-select component, which blocks rendering of page in browser and user see only white page with no content.
Steps to reproduce:
- Create lots of domains with create_lots_of_subnets.sh (run this with params “100 200”)
- Go to Administration > Locations > Edit location
- Go to Infrastructure > Subnets > edit subnet
Cause of problem
How to fix it?
- My first idea was to load data with ajax after page is loaded, then format them. But when I found that the issue is not on backend side but on frontend, this solution doesn’t solve anything.
- I’ve been also thinking about something like “lazy-load” tab panel, in which case the data would have been downloaded from backend, but parsed by JS AFTER user clicks on tab and display it’s content.
Either way I’m not sure about the best approach / solution how to fix this issue, does anybody have some ideas how to solve this issue?