Coder Social home page Coder Social logo

Comments (9)

M1ck0 avatar M1ck0 commented on April 30, 2024 1

I'll send you a link in a few hours.

from analytics.

timolins avatar timolins commented on April 30, 2024 1

The initial issue you mentioned appeared to be caused by Cloudflare, which sits in-front of your deployment. We recently switched to a more loose caching policy, allowing Cloudflare to cache the script, which should resolve the issue you mentioned.

To make sure, I made an experiment that compares the Next.js 13 starter in 4 different environments:

  • Without Audiences
  • With Audiences
  • Without Audiences + Cloudflare
  • With Audiences + Cloudflare

A ran this test multiple times and there was no notable difference for environments that had Audiences enabled.

image

I'll close this issue for now.


It might be worth to experimenting with removing Google Tag Manager as well, which could be the cause of the slow down.

from analytics.

timolins avatar timolins commented on April 30, 2024

Hi there! Mind sharing a preview URL for this?

from analytics.

M1ck0 avatar M1ck0 commented on April 30, 2024

@timolins

It is currently on my work-in-progress website. Here is the link https://www.miletadulovic.me/

When you do a hard reload Command + Shift + R (Ctrl + Shift + R) while the network tab is open in the console, you'll see script.js file that is 1.1-1.3 kb heavy and loading for a long time. I just rechecked it, It took 3.57 sec.

This really reduces page speed score on both Vercel analytics, and Google Page Speed analytics. I first wasn't sure from where is this coming, but after disabling Vercel analytics, this file vanished from the network tab.

Screenshot 2022-10-31 at 12 38 27

Here are the headers for this file
Screenshot 2022-10-31 at 12 39 18

Screenshot 2022-10-31 at 12 39 45

from analytics.

M1ck0 avatar M1ck0 commented on April 30, 2024

Any updates on this? @timolins

from analytics.

tobiaslins avatar tobiaslins commented on April 30, 2024

@M1ck0 I saw that the script is currently embedded on your page and did several speed score tests (Google Page Speed, etc) and did not see anything poping up because of that longer script load time. (It's async and soon defer so will not block anything)
Can you share us some results that shows the script impacts your page?

from analytics.

M1ck0 avatar M1ck0 commented on April 30, 2024

@timolins Here are the screenshots

Screenshot 2022-11-04 at 20 51 54

Screenshot 2022-11-04 at 20 57 20

Take a look at Time to Interactive and Total Blocking time. The difference is enormous.

Also, look at the treemap, when is the first frame presented to a user?

Are you sure that you can't see anything wrong with this? And let me also say that the page I am testing is just a page with few lines of text, no API calls, no interactions, or anything.

When I removed @vercel/analytics it was much better. With that package when I try to load the site in incognito, I always see blank (white) screen for like second or two (based on my connection) and then page appears.

from analytics.

timolins avatar timolins commented on April 30, 2024

Interesting, thanks for investigating! Mind sharing a preview deployment link with us that has Audiences enabled? So we can compare as well.

from analytics.

M1ck0 avatar M1ck0 commented on April 30, 2024

@timolins I added it to the main deployment so you can go check it there.

miletadulovic.me

from analytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.