0

I have struggled with slow performance in my Community for years now. It is getting worse. We use a Community for our publicly facing website & for our portal. The slow performance is on all pages regardless of whether any queries are being called. A Salesforce partner today found that Salesforce is rendering information for all of the site's pages in the bootstrap.js file that is taking over 9 seconds to load. After deleting about 40 of our site's pages in a test environment, the site's speed improved. This is not an acceptable solution because we need a lot of pages in our Community and will continue to need more. We also use a lot of Salesforce's security (audiences) to hide/display pages/components.

Is anyone familiar with this & what can be done about this. If this can't be resolved, we will need to move off of Community as our website/portal. We need to continue to add pages & cannot continue to have the slow performance we are seeing much less it getting worse.

18
  • 1
    Apparently you can get a significant speed boost (around 30% I think ) if you use a lwc template. However, at present, I don't think it the new templates do audiences (which I also use). They are pretty handy! Have you checked for any other timing issues in the network tab in the developer console of your browsesr? You might find some improvements there. Also, you can get an external CDN to host the site, which is supposed to improve things. Jun 4, 2021 at 5:10
  • A digital experience, aka Community, is what is called a single page app, as mentioned here, hence all pages delivered up front. As Casper Harmer said, Salesforce provide a very basic and light weight option using the Lightning Web Runtime, covered here but this is really only suitable for pro code development as the template exposes next to no component options at all.
    – Phil W
    Jun 4, 2021 at 6:43
  • 1
    I don't have the experience with a large scale digital experience (I've only created with 5-10 pages). If you use Aura extensively, you should definitely use LWC as these are much, much more performant, however you should edit your question to clarify the scale and content of the community since on re-reading you imply the performance is poor, not just on loading but executing activities within the pages, and that means it isn't the SPA nature of the community that is the issue but rather the components within the pages. You should consider profiling the site using your browser's inspector.
    – Phil W
    Jun 4, 2021 at 13:25
  • 1
    We are using the custom service template in public facing community. It is a very UI heavy community with about 50 different pages and 70 LWC + 20 Aura components. The home page took about 10 seconds to load .We reviewed it and noticed there were couple of factors 1. Initial load time - Enabled CDN to reduce some time there. 2. Preloading resources in global markup. 3. Enabling priority loading (OOTB). 4. Combined the XHR calls to make sure at most 6 calls can be made on the page. 5. Stopped making avoidable changes in render-callback to reduce re-rendering cycles.
    – manjit5190
    Jun 4, 2021 at 14:55
  • 1
    6. Marked all static resources as public cacheable. 7. Implemented caching (platform) for some data which won't change frequently. 8. Optimized image sizes. 9. Stopped using full page spinners (perception for end user). All these led to 50% reduction in loading time. Now the site loads in 5 seconds maximum. We are still optimizing. Movement to BYO (Non LWR) template is on our list next if a switch is possible .
    – manjit5190
    Jun 4, 2021 at 14:56

1 Answer 1

3

We have a similar open community/experience and were facing slowness issues. The slowness is because our community is completely custom. We do have CDN enabled and we occasionally run Google page speed insights to check what is causing the slowness and also use the Community optimizer extension in Chrome.

We are using the custom service template in public facing community. It is a very UI heavy community with about 50 different pages and 70 LWC + 20 Aura components + 6 different audiences. The home page took about 10 seconds to load.

We reviewed it and noticed there were couple of factors

  1. Initial load time - Enabled CDN to reduce some time there.
  2. Preloading resources in global markup.
  3. Enabling priority loading (OOTB).
  4. Combined the XHR calls to make sure at most 6 calls can be made on the page.
  5. Stopped making avoidable changes in render-callback to reduce re-rendering cycles.
  6. Marked all static resources as public cacheable.
  7. Implemented caching (platform) for some data which won't change frequently.
  8. Optimized image sizes.
  9. Stopped using full page spinners (perception for end user).

All these led to 50% reduction in loading time. Now the site loads in 5 seconds maximum. We are still optimizing to reduce it to 2-3 seconds. Movement to BYO (Non LWR) template is on our list next if a switch is possible and we are also looking into converting Aura components to LWC.

I would suggest to run your community through Lighthouse (built into most browsers)/page speed insights and Salesforce community extension to find what is causing the slowness. The bootstrap js would add to initial load times but there are lot of other factors, perception being one of them.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .