We have implemented a custom rollout by using the OOTB RolloutManager's rollout functionality and passing the required attributes.
We have basically used what we have for we.retail and implemented language masters and live copy implementation for about 10 different languages.
In local env rollout works just fine and it is super fast but when we deployed the functionality to QA env, it takes a way too much time.
Upon lot of investigation and indexing, we are able to narrow it down the issue is because of the number of blueprints (3500+) available in the QA env and because of that it is taking lot of time.
When we had used profiler then this is what it is pin-pointing at the bundle - com.day.cq.wcm.cq-msm-core - version 5.12.58
at com.day.cq.wcm.msm.impl.BlueprintImpl.<init>(BlueprintImpl.java:77)+
at com.day.cq.wcm.msm.impl.BlueprintManagerImpl.getBlueprints(BlueprintManagerImpl.java:50)
at com.day.cq.wcm.msm.impl.BlueprintManagerImpl.getContainingBlueprint(BlueprintManagerImpl.java:80)
at com.day.cq.wcm.msm.impl.BlueprintManagerImpl.getContainingBlueprint(BlueprintManagerImpl.java:22)
at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.computeRolloutConfigs(LiveRelationshipManagerImpl.java:899)
at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.buildRelationship(LiveRelationshipManagerImpl.java:862)
at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.getChildRelation(LiveRelationshipManagerImpl.java:1031)
at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.getChildren(LiveRelationshipManagerImpl.java:172)
at com.day.cq.wcm.msm.impl.RolloutContextImpl.getChildren(RolloutContextImpl.java:384)
at com.day.cq.wcm.msm.impl.RolloutManagerImpl.rolloutResource(RolloutManagerImpl.java:807)
at com.day.cq.wcm.msm.impl.RolloutManagerImpl.rolloutResource(RolloutManagerImpl.java:809)
at com.day.cq.wcm.msm.impl.RolloutManagerImpl.rolloutPage(RolloutManagerImpl.java:693)
at com.day.cq.wcm.msm.impl.RolloutManagerImpl.rolloutPageRelations(RolloutManagerImpl.java:623)
at com.day.cq.wcm.msm.impl.RolloutManagerImpl.rollout(RolloutManagerImpl.java:514)
at com.<my-project>.overlay.msm.servlets.MyRolloutServlet.rolloutOtherlanguages(MyRolloutServlet.java:287)
After we removed those blueprints and kept only some handful blueprints under /etc/blueprints, performance again improved drastically in QA.
All those blueprints are at /etc/blueprints as those were from AEM 6.3
After we have upgraded to AEM 6.5.7.0, the new blueprints are being created under /apps/msm folder.
We have not tried to move blueprints from /etc/blueprints to /apps/msm yet but will try next.
Does anyone have any advice or suggestions how to address this slow rollout issue?
Thanks in advance.