[Plone.org] #1313: Plone.org site slow due to calling google-analytics.com?

9 messages Options
Embed this post
Permalink
Plone.org () [Plone.org] #1313: Plone.org site slow due to calling google-analytics.com?
Reply Threaded More More options
Print post
Permalink
#1313: Plone.org site slow due to calling google-analytics.com?
---------------------+------------------------------------------------------
Reporter:  hemmecke  |       Owner:  [hidden email]
    Type:  bug       |      Status:  new                                
Priority:  major     |   Component:  website                            
Keywords:            |  
---------------------+------------------------------------------------------
 I often experience a slow plone.org which I reported here...
 http://sourceforge.net/mailarchive/forum.php?thread_name=49DCCA53.7000706
 %40goldmund-wyldebeast-wunderliebe.com&forum_name=plone-users

 I think a plone site that sometimes take more than a minute to display
 just gives the wrong impression for people who are about to evaluate plone
 against other CMS.

 If this problem I report  here is connected to google analytics, then
 better turn it off.

--
Ticket URL: <https://dev.plone.org/plone.org/ticket/1313>
Plone.org <http://plone.org>
Plone.org services maintenance
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Plone-website mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-website
The Wiki: http://plone.org/development/current/projects/WebsiteTeam
Plone.org () Re: [Plone.org] #1313: Plone.org site slow due to calling google-analytics.com?
Reply Threaded More More options
Print post
Permalink
#1313: Plone.org site slow due to calling google-analytics.com?
-----------------------+----------------------------------------------------
  Reporter:  hemmecke  |       Owner:  [hidden email]
      Type:  bug       |      Status:  closed                            
  Priority:  major     |   Component:  website                            
Resolution:  invalid   |    Keywords:                                    
-----------------------+----------------------------------------------------
Changes (by limi):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 Not related to Google Analytics.

--
Ticket URL: <https://dev.plone.org/plone.org/ticket/1313#comment:1>
Plone.org <http://plone.org>
Plone.org services maintenance
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Plone-website mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-website
The Wiki: http://plone.org/development/current/projects/WebsiteTeam
Plone.org () Re: [Plone.org] #1313: Plone.org site slow due to calling google-analytics.com?
Reply Threaded More More options
Print post
Permalink
In reply to this post by Plone.org
#1313: Plone.org site slow due to calling google-analytics.com?
-----------------------+----------------------------------------------------
  Reporter:  hemmecke  |       Owner:  [hidden email]
      Type:  bug       |      Status:  reopened                          
  Priority:  major     |   Component:  website                            
Resolution:            |    Keywords:                                    
-----------------------+----------------------------------------------------
Changes (by calvinhp):

  * status:  closed => reopened
  * resolution:  invalid =>

Comment:

 This is due to google.

 http://bit.ly/3lr6p7

 The page was ready to render in 275ms, but didn't actually render until we
 got the first byte back from google at 604ms.  There is a big problem here
 as that is doubling the rendering time of the page in the browser even
 though Plone had already done its job.

--
Ticket URL: <https://dev.plone.org/plone.org/ticket/1313#comment:2>
Plone.org <http://plone.org>
Plone.org services maintenance
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Plone-website mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-website
The Wiki: http://plone.org/development/current/projects/WebsiteTeam
Plone.org () Re: [Plone.org] #1313: Plone.org site slow due to calling google-analytics.com?
Reply Threaded More More options
Print post
Permalink
In reply to this post by Plone.org
#1313: Plone.org site slow due to calling google-analytics.com?
-----------------------+----------------------------------------------------
  Reporter:  hemmecke  |       Owner:  [hidden email]
      Type:  bug       |      Status:  reopened                          
  Priority:  major     |   Component:  website                            
Resolution:            |    Keywords:                                    
-----------------------+----------------------------------------------------
Changes (by calvinhp):

 * cc: calvinhp (added)

--
Ticket URL: <https://dev.plone.org/plone.org/ticket/1313#comment:3>
Plone.org <http://plone.org>
Plone.org services maintenance
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Plone-website mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-website
The Wiki: http://plone.org/development/current/projects/WebsiteTeam
Plone.org () Re: [Plone.org] #1313: Plone.org site slow due to calling google-analytics.com?
Reply Threaded More More options
Print post
Permalink
In reply to this post by Plone.org
#1313: Plone.org site slow due to calling google-analytics.com?
-----------------------+----------------------------------------------------
  Reporter:  hemmecke  |       Owner:  [hidden email]
      Type:  bug       |      Status:  reopened                          
  Priority:  major     |   Component:  website                            
Resolution:            |    Keywords:                                    
-----------------------+----------------------------------------------------
Comment (by davisagli):

 We might be able to use something like this to defer the loading of the GA
 javascript so that it doesn't block page rendering:

 {{{
 var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl."
 : "http://www.");
 jq(function() {
     setTimeout(function() {
         jq('<script type="text/javascript" src="' + gaJsHost + 'google-
 analytics.com/ga.js"><' + '/script><script type="text/javascript">var
 pageTracker = _gat._getTracker("UA-1907133-2");
 pageTracker._trackPageview();<' + '/script>').appendTo('body');
     }, 5);
 });
 }}}

 (The extra 5 milliseconds is needed to make this work in IE.)

 However, I haven't tested this technique with ga.js and I'm not sure if
 this would affect the functioning of analytics.  Surely we would already
 not have the GA code inline if it didn't have to be?

--
Ticket URL: <https://dev.plone.org/plone.org/ticket/1313#comment:4>
Plone.org <http://plone.org>
Plone.org services maintenance
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Plone-website mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-website
The Wiki: http://plone.org/development/current/projects/WebsiteTeam
Plone.org () Re: [Plone.org] #1313: Plone.org site slow due to calling google-analytics.com?
Reply Threaded More More options
Print post
Permalink
In reply to this post by Plone.org
#1313: Plone.org site slow due to calling google-analytics.com?
-----------------------+----------------------------------------------------
  Reporter:  hemmecke  |       Owner:  [hidden email]
      Type:  bug       |      Status:  reopened                          
  Priority:  major     |   Component:  website                            
Resolution:            |    Keywords:                                    
-----------------------+----------------------------------------------------
Changes (by deesto):

 * cc: deesto (added)

Comment:

 Whatever the solution, I think the outcome may be of interest to more than
 just plone.org itself.  I use Analytics on my Plone sites, and I've seen
 measurable slow-downs in page loads due to connections to the .JS script.

--
Ticket URL: <https://dev.plone.org/plone.org/ticket/1313#comment:5>
Plone.org <http://plone.org>
Plone.org services maintenance
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Plone-website mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-website
The Wiki: http://plone.org/development/current/projects/WebsiteTeam
Plone.org () Re: [Plone.org] #1313: Plone.org site slow due to calling google-analytics.com?
Reply Threaded More More options
Print post
Permalink
In reply to this post by Plone.org
#1313: Plone.org site slow due to calling google-analytics.com?
-----------------------+----------------------------------------------------
  Reporter:  hemmecke  |       Owner:  [hidden email]
      Type:  bug       |      Status:  reopened                          
  Priority:  major     |   Component:  website                            
Resolution:            |    Keywords:                                    
-----------------------+----------------------------------------------------
Changes (by newbery):

 * cc: newbery (added)

Comment:

 Hmm... why doesn't Plone.org call the javascript using the jquery
 substitute for registerPloneFunction?

 In the AnalyticsForPlone product (pre-Plone3 and pre-jquery), the inline
 code looks like...

 <script type="text/javascript"><!--
 if(location.protocol=='https:'){document.write('<script src="https://ssl
 .google-analytics.com/urchin.js" type="text/JavaScript"><\/script>')}
 else{document.write('<script src="http://www.google-
 analytics.com/urchin.js" type="text/JavaScript"><\/script>')}
 function callGoogleAnalytics(){_uacct="UA-xxxxxxx";urchinTracker()}
 registerPloneFunction(callGoogleAnalytics);
 // --></script>


 In Plone.org, the inline code looks like...

 <script type="text/javascript">
 var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl."
 : "http://www.");
 document.write(unescape("%3Cscript src='" + gaJsHost + "google-
 analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script>
 <script type="text/javascript">
 var pageTracker = _gat._getTracker("UA-1907133-2");
 pageTracker._trackPageview();
 </script>


 The Plone.org version is placed at the bottom of the page so that helps
 but I wonder if it would be better to load after the page is parsed which
 is what the old registerPloneFunction did (need to lookup how it's done in
 jquery).

--
Ticket URL: <https://dev.plone.org/plone.org/ticket/1313#comment:6>
Plone.org <http://plone.org>
Plone.org services maintenance
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Plone-website mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-website
The Wiki: http://plone.org/development/current/projects/WebsiteTeam
Plone.org () Re: [Plone.org] #1313: Plone.org site slow due to calling google-analytics.com?
Reply Threaded More More options
Print post
Permalink
In reply to this post by Plone.org
#1313: Plone.org site slow due to calling google-analytics.com?
-----------------------+----------------------------------------------------
  Reporter:  hemmecke  |       Owner:  [hidden email]
      Type:  bug       |      Status:  reopened                          
  Priority:  major     |   Component:  website                            
Resolution:            |    Keywords:                                    
-----------------------+----------------------------------------------------
Comment (by limi):

 Yeah, we should probably consider loading it asynchronously, but I seem to
 remember Geir & co trying to do this a while back and running into
 trouble. Worth re-examining.

 If we throw the timing off, that's not a big deal, just as long as nothing
 else is affected (referrers, etc)

--
Ticket URL: <https://dev.plone.org/plone.org/ticket/1313#comment:7>
Plone.org <http://plone.org>
Plone.org services maintenance
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Plone-website mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-website
The Wiki: http://plone.org/development/current/projects/WebsiteTeam
Plone.org () Re: [Plone.org] #1313: Plone.org site slow due to calling google-analytics.com?
Reply Threaded More More options
Print post
Permalink
In reply to this post by Plone.org
#1313: Plone.org site slow due to calling google-analytics.com?
-----------------------+----------------------------------------------------
  Reporter:  hemmecke  |       Owner:  [hidden email]
      Type:  bug       |      Status:  reopened                          
  Priority:  major     |   Component:  website                            
Resolution:            |    Keywords:                                    
-----------------------+----------------------------------------------------
Comment (by limi):

 Seems like there's a jQuery version here:

 http://925html.com/code/non-blocking-google-analytics-integration/

--
Ticket URL: <https://dev.plone.org/plone.org/ticket/1313#comment:8>
Plone.org <http://plone.org>
Plone.org services maintenance
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Plone-website mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-website
The Wiki: http://plone.org/development/current/projects/WebsiteTeam