0

We have a home page where it contains 6-7 SPFx webparts built with 'No JavaScript Framework'.

We need to load all the components in the Home page simultaneously since now it is loading One by One which is taking long time for site loading.

As part of performance improvement and better user experience we are trying to load all components(SPFx webparts) at same time.

Kindly suggest if there is any way to do so.

Note: We are using Classic pages

  • Are you performing blocking Ajax requests (i.e. synchronous) from these web parts? You cannot control the loading of your web parts, but as long as any long running operations are async, they should mostly appear to be loading async. – Joe McShea Mar 25 at 13:01
  • i am using pnp with 'async' & 'await'. Still due to multiple components it takes some time to complete the home page load – Sukumar MS Mar 25 at 13:41
  • I haven't used async await much, but reading about the pitfalls of it it's not that hard to deviate from the pattern slightly causing it to really act like a blocking call. If the web parts appear to load one at a time, I'd look into that (maybe try switching to promises for yucks). If they're clearly loading simultaneously, there isn't much reason to think explicitly setting the load order would change anything? – Joe McShea Mar 27 at 13:03
0

There is no way today to control the loading sequence of web parts on a page. The only things that could impact/improve it would be doing things like loading common libraries from external CDN references to avoid loading multiple times the same code.

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.