Does Google Analytics have performance overhead?

后端 未结 16 1742
星月不相逢
星月不相逢 2020-12-13 03:35

To what extent does Google Analytics impact performance?

I\'m looking for the following:

  • Benchmarks (including response times/pageload times et al)
16条回答
  •  感动是毒
    2020-12-13 03:48

    It really depends on the day. I'm just adding this to a blog. I'm in california, very close to their main data centers, on a fast low latency business DSL, on a overclocked i5 with plenty of RAM running a recent linux kernel and stable firefox.

    here's a sample page load: enter image description here

    google-analytics alone added 5 seconds just of network download time... to get 15Kb!

    You can see blogger.com served 34Kb in 300 mili seconds. That's 32x faster!

    Also, look how the Red Line (which represents the onLoad event, meaning, there's no more script executing on the page and the so the browser can finally stops the loading indicators/spinings/etc) ... look how far to the right it is. that's probably 3seconds of garbage javascript processing that happened there. It's very uncommon for that line to be very far away from the end of the resources download bars. I'm done debugging this and it's 1/3 analytics fault, 2/3 blogger fault. ...one would think google stuff was fast.

    Edit:

    Some more data. Here's a request with everything cached. the above one was first visit.

    I've removed the googleplus crap from above for two reasons, I was trying to see if they were playing some part on the slow onLoad event (they aren't) and because It is mostly useless.

    enter image description here

    So, With this we can see that the network time is the least of your worries. Even on a fast computer with modern software, the toll google analytics + blogger take on processing time will still dump your page load past 7s. Without the blogger, just check this very site, i'm seeing 0.5s of delay after resources are loaded and the red line kicks in.

提交回复
热议问题