data-sly-resource taking so much time to resolve the Experience fragment page path | Community
Skip to main content
New Participant
September 1, 2022
Solved

data-sly-resource taking so much time to resolve the Experience fragment page path

  • September 1, 2022
  • 1 reply
  • 821 views

We utilized the Experience fragment as the primary navigation (header navigation), and it contains a number of flyouts.


We used sly data-sly-resource="$@path=xffragmentpath, selectors='content', wcmmode='disabled'">/sly> to render the flyout on the page.


As shown in publish mode, the page takes a long time to load.
And we determined that the problem is caused solely by data-sly-resource.


The page has a lot of child pages; yet, if we do the same thing on a page with no child pages, it works properly.


Please advise any solutions to help me increase the performance of my site.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

That means that the problem is rather with the amount of data you are checking. The path resolution itself is unlikely to be a problem here, unless you do that a thousand times in a loop.

1 reply

arunpatidar
New Participant
September 1, 2022

The problem seems to be with the flyout logic, which renders based on the page children component rather than XF.

Can you try adding the flyout component in a page directly with the same number of children to determine if the problem is with flyout or XF. 

Arun Patidar
mansainiAuthor
New Participant
September 2, 2022

Only data-sly-resource is the issue; performance improved if I commented out this line <sly data-sly-resource="${@path=....}"/>.
Only the main home page, which contains several child sites, is affected by this problem.

joerghoh
joerghohAccepted solution
Employee
September 4, 2022

That means that the problem is rather with the amount of data you are checking. The path resolution itself is unlikely to be a problem here, unless you do that a thousand times in a loop.