Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datalayer init is blocking browser main thread for too long #121

Open
keepthebyte opened this issue May 4, 2021 · 0 comments
Open

Datalayer init is blocking browser main thread for too long #121

keepthebyte opened this issue May 4, 2021 · 0 comments

Comments

@keepthebyte
Copy link

keepthebyte commented May 4, 2021

Expected Behaviour

Adding the datalayer to a website, only minimally impacts the loading performance of the page.

Actual Behaviour

For a simple site like https://wknd.site/us/en.html - the datalayer blocks the main thread of the browser by ~120ms during the user critical HTML rendering.

DevTools_-_wknd_site_us_en_html

In AEM the datalayer is loaded in the footer
https://github.com/adobe/aem-core-wcm-components/blob/master/content/src/content/jcr_root/apps/core/wcm/components/page/v2/page/footer.html#L23

without the recommended "async" and "defer" attributes - not sure if that would make a difference - hence it would need to get fixed in the Core Components to load the datalayer according to recommendations.

Platform and Version

https://wknd.site/etc.clientlibs/core/wcm/components/commons/datalayer/v1/clientlibs/core.wcm.components.commons.datalayer.v1.lc-5571dbb70dbe447668b2c28f8e3d0eaf-lc.min.js

Core Components 2.15.2 as part of CS 2021.4.5226.20210427T070726Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant