Foreman environment import taking too long


Why does it take over 6mins+ to import very few environments in foreman. This is irrespective of the tool. Curl, API, Hammer.
I have also enabled caching in all yml files.
Any help would be appreciated.

Problem: Foreman environment import taking too long.

Expected outcome: Faster imports


the duration of the import is not directly related to the number of envirenments but rather the number and complexity of puppet classes that have to be processed.
So generally, the more classes you have and the more parameters each of them has, the longer the process will take.
Could you elaborate more on how big your environments are and how many you have?

Less than 5 env and 240 classes in each. Takes over 8-9 mins to import them. Is there a way to do this faster? Am I missing something?
PS: Caching is enabled.

This indeed does sound surprisingly long.
I fear I will not be able to help a lot with this, since I do not know about the inner workings here.
Afaik the main time is spent by the Puppet Server scanning it’s directories. In that case, it would probably be considered a Puppet issue rather than a Foreman one. But maybe someone from development team needs to take a look into this.