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

Avoid Total Blocking Time increase #94

Open
mhoev opened this issue Mar 18, 2023 · 0 comments
Open

Avoid Total Blocking Time increase #94

mhoev opened this issue Mar 18, 2023 · 0 comments

Comments

@mhoev
Copy link

mhoev commented Mar 18, 2023

The integration of Matomo into our Next.js site unfortunately increases the Total Blocking Time (TBT) in http://pagespeed.web.dev (mobile) to 300 to 500ms.

We were thinking of two ideas of how to reduce the impact:

  1. Instead of loading matomo.js as a file, integrate its component directly into Next.js as this may avoid redundant code
  2. Reduce the load for the main thread by utilising a web worker as next/script has now (experimental) support for it

Any thoughts on the above?

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