5

I have an issue with a lightning component. It's a component that is placed within Visualforce Page with the below technique:

    $Lightning.use("c:CPQ_CONF00_OutApp", function() {
            $Lightning.createComponent("c:CPQ_CONF01_Wrapper",
            {  "previewMode" : "true",
                "recordId" : "{!CPQ_Quote__c.Id}" },
                    "lightning",
                function(cmp) {
                }
            );
    });

It used to take 1 - 2 seconds after the page loaded and before the component started to load, but right this time is about 8 seconds! This is crazy. I haven't changed anything in the code, so seems like Salesforce did something.

I don't know if this has something to do with SFDC version, but actually I observe this situation since the environment was upgraded to Summer 16' preview. I have the same component installed on dev environment with Spring 16' and loading time is still acceptable: 1 - 2 seconds.

Another issue that I observe starting Sumemr 16' - all custom visualforce pages get this error in JS console. Maybe this has something to do with this problem, but again this started to apply for all Visualforce pages, not only the one where I initialize my Lightning Component.

XMLHttpRequest cannot load https://cs87.salesforce.com/_/52609e00b7ee307e. 
No 'Access-Control-Allow-Origin' header is present on the requested resource. 
Origin 'https://c.cs87.visual.force.com' is therefore not allowed access.

Does anybody experience similar issues?

Update I've captured network events from dev console. I made a comparison between two environments. I counted time until spinner.gif is loaded - in Summer 16 it takes around 9s, in spring 4s.

Summer 16' environment Spring 16' environment

3

This is the first I have heard of the slow loading issue and the problem is most likely on our end. I have not observed this behavior in Summer'16 and need more info to be able to make progress. Please open a case with Sakesforce support and let me know the case ID so I can follow up on it. We will get this fixed. Could you also capture the Network tab's contents in Chrome dev tools or equivalent tooling that shows the network requests for your scenario and post it here? There are many possible locations where the slowdown could be happening and this will help us eliminate many of them.

As for the Cross Origin Request exception for that resource I have definitely seen that but have not yet tracked down the culprit. As you mentioned this is not Lightning Components related. I'm pinging the Visualforce team now to see if they are already looking into this.

  • Many thanks for reply. I've added snippets from network resources as edits to original question (first picture: summer 16, second spring 16), maybe they will be helpful. And also I asked customer to log a case (they own prod environment, so I have to wait for them), when I'll have case opened I'll let you know the number. – Maciek Simm May 15 '16 at 19:59
  • Hi Doug, I got case number for this: #13858688 – Maciek Simm May 17 '16 at 8:06
2

I was trying out different things, and it seems this worked for me.

My ltng:outApp contains <aura:dependency>tag (as in documentation). When I commented out this part - app loads much faster again.

<aura:application access="GLOBAL" extends="ltng:outApp">
    <!-- <aura:dependency resource="c:CPQ_CONF01_Wrapper"/> -->
</aura:application>

Maybe someone with more knowledge of the framework can tell why, and if this "fix" will not break something else?

  • Seems product team has done something and this issue is now gone. – Maciek Simm Jun 13 '16 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.