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

www.grupodelrey.com.br - Very slow page load #125671

Open
webcompat-bot opened this issue Aug 11, 2023 · 5 comments
Open

www.grupodelrey.com.br - Very slow page load #125671

webcompat-bot opened this issue Aug 11, 2023 · 5 comments
Labels
action-needssitepatch This web bug needs a GoFaster site patch. android 13 issues specific to android13 browser-focus-geckoview diagnosis-priority-p2 engine-gecko The browser uses the Gecko rendering engine priority-normal severity-critical The site or core functionality is unusable, or you would probably open another browser to use it. trend-pageload OKR Label - page does not load (blank page, error messages received, stuck in a loading state/loop) trend-perfprofile OKR Label - issues probably related to bad performance
Milestone

Comments

@webcompat-bot
Copy link

webcompat-bot commented Aug 11, 2023

URL: https://www.grupodelrey.com.br/linhas

Browser / Version: Firefox Mobile 116.0
Operating System: Android 13
Tested Another Browser: Yes Chrome

Problem type: Site is not usable
Description: Page not loading correctly
Steps to Reproduce:
It's Slowly to open. +60sec.
Sometimes don't open.
Site riquires "cookies".
Totally instable.

View the screenshot Screenshot
Browser Configuration
  • gfx.webrender.all: false
  • gfx.webrender.blob-images: true
  • gfx.webrender.enabled: false
  • image.mem.shared: true
  • buildID: 20230805021307
  • channel: release
  • hasTouchScreen: true
  • mixed active content blocked: false
  • mixed passive content blocked: false
  • tracking content blocked: false

View console log messages

From webcompat.com with ❤️

@webcompat-bot webcompat-bot added the action-needsmoderation The moderation has not yet been completed label Aug 11, 2023
@webcompat-bot webcompat-bot added this to the needstriage milestone Aug 11, 2023
@webcompat-bot webcompat-bot added the browser-fixme This requires manual assignment for the browser name label Aug 11, 2023
@webcompat-bot webcompat-bot changed the title In the moderation queue. www.grupodelrey.com.br - site is not usable Aug 11, 2023
@webcompat-bot webcompat-bot added browser-focus-geckoview engine-gecko The browser uses the Gecko rendering engine and removed browser-fixme This requires manual assignment for the browser name action-needsmoderation The moderation has not yet been completed labels Aug 11, 2023
@sv-calin sv-calin added the android 13 issues specific to android13 label Aug 11, 2023
@sv-calin
Copy link

Thank you for reporting this issue, I was able to reproduce it. The page loads really slow compared to Chrome.

image

Tested on:
• Browser / Version: Firefox Focus 116.0.2-20230805021307 / Firefox Nightly 118.0a1-20230810094725 / Firefox Release 116.0.2-20230805021307 / Chrome 115.0.5790.136
• Operating System: Google Pixel 5 (Android 13) - 1080 x 2340 pixels, 19.5:9 ratio (~432 ppi density)

Notes:

  1. Reproducible on both Firefox Release and Nightly
  2. Private mode and ETP settings seems to affect the load time even more
  3. Not reproducible on Chrome

Moving to Needsdiagnosis.

[qa_32/2023]

@sv-calin sv-calin changed the title www.grupodelrey.com.br - site is not usable www.grupodelrey.com.br - Very slow page load Aug 11, 2023
@sv-calin sv-calin added priority-normal severity-critical The site or core functionality is unusable, or you would probably open another browser to use it. trend-perfprofile OKR Label - issues probably related to bad performance labels Aug 11, 2023
@sv-calin sv-calin modified the milestones: needstriage, needsdiagnosis Aug 11, 2023
@sv-calin sv-calin added the trend-pageload OKR Label - page does not load (blank page, error messages received, stuck in a loading state/loop) label Aug 11, 2023
@ksy36
Copy link
Contributor

ksy36 commented Aug 14, 2023

@sv-calin wonder if you could record a perf profile, please?

@ksy36 ksy36 added the status-needsinfo-calin ping @sv-calin label Aug 17, 2023
@sv-calin
Copy link

Performance profile: https://share.firefox.dev/47BV7Ed

Note: Captured with Standard ETP

Tested on:
• Browser / Version: Firefox Nightly 118.0a1-20230816094547
• Operating System: Google Pixel 5 (Android 13) - 1080 x 2340 pixels, 19.5:9 ratio (~432 ppi density)

[inv_33/2023]

@sv-calin sv-calin removed the status-needsinfo-calin ping @sv-calin label Aug 17, 2023
@ksy36
Copy link
Contributor

ksy36 commented Dec 28, 2023

The site is attempting to parse css and apply some modifications to it and it ends up in an endless loop:

		//read style tags
		$("style").each(function(){
			var conts=$(this).html();
			readCss(conts,"background",false);
		});
		//@param: path - path which to make the urls change to (false to disable)
		function readCss(conts,prop,path){
			var output={};
			//get rid of comments
			conts=conts.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,'');
			var pos=conts.indexOf(prop);
			//loop through all backgrounds in the stylesheet
			while(pos>-1){
				var bgVal=replaceWithLower($.trim(conts.substr(conts.indexOf(":",pos+1)+1,conts.indexOf(";",pos+1)-conts.indexOf(":",pos+1)-1)),"url(");
			
				//only do anything if there are actually multiple bgs in the property
				
				bgVal=replaceInnerComma(bgVal);
				if(bgVal.indexOf(",")>-1){
					
					
					//make paths relative to the stylesheet work out
					if(path){
						var urlPos=bgVal.indexOf("url(");
						while(urlPos>-1){
							//don't do any working on absolute urls
							if(bgVal.substr(urlPos+4,7).toLowerCase()!="http://"){
								var extraSlash=(bgVal.substr(urlPos+4,1) == '/');
								var domain=document.URL.substr(0,document.URL.indexOf('/',9));
								bgVal=bgVal.substr(0,urlPos+4)+(extraSlash ? domain :path)+bgVal.substr(urlPos+4);
							};
							//seek to next
							urlPos=bgVal.indexOf("url(",urlPos+1);
						};
					};
				
					//determine if there was an important in this bg value
					var important=bgVal.length;
					bgVal=bgVal.replace("!important","");
					important=(important==bgVal.length ? false : true);
					var prevBrace=conts.lastIndexOf("}",pos)+1;
					//Allow for charset 
					if(conts.lastIndexOf(";",pos)+1>prevBrace) prevBrace=conts.lastIndexOf(";",conts.lastIndexOf("{",pos))+1;
					if(prevBrace==-1) prevBrace=0;
					var selector = $.trim(conts.substr(prevBrace,conts.lastIndexOf("{",pos)-prevBrace));
					//account for multiple selectors
					var selSplit=selector.split(",");
					for(var i=0;i<selSplit.length;i++){
						var curSel=$.trim(selSplit[i]);
						curSel=replaceWithLower(curSel,":active");
						curSel=replaceWithLower(curSel,":hover");
						curSel=replaceWithLower(curSel,":focus");
						
					
						output[curSel]={property:prop,value:bgVal,selScore:selectorScore(curSel,important)};
					};
				};
			
			
				pos=conts.indexOf(prop,conts.indexOf(";",pos+1));
			};
			//put the contents into the storage
			$.extend(myCss,output);
		};
		//find lower/uppercase combinations and replace with lowercase for compatability
		function replaceWithLower(inStr,replaceWith){
			var linStr=inStr.toLowerCase();
			var pos=linStr.indexOf(replaceWith);
			while(pos>-1){
				inStr=inStr.substr(0,pos)+replaceWith+inStr.substr(pos+replaceWith.length);
				pos=linStr.indexOf(replaceWith,pos+1);
			};
			return inStr;
		};
	  

It only happens in Firefox because of the incorrect UA detection :

	//conditional for which browsers you want to support (ie6/7/8,firefox<=3.5)
	if(($.browser.msie && parseFloat($.browser.version)>=6 && parseFloat($.browser.version)< 9)||
	   ($.browser.mozilla && parseInt($.browser.version.substr(0,1))<=1 && parseInt($.browser.version.substr(2,1))<=9 && parseInt($.browser.version.substr(4,1))<=1)){

Capping the rv part of UA to 99 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:99.0) Gecko/20100101 Firefox/123.0 makes it so the above condition doesn't pass and the parsing script is not run, similarly to Chrome. We can add a sitepatch here for both mobile and desktop and contact the site

@ksy36 ksy36 added action-needssitepatch This web bug needs a GoFaster site patch. and removed status-needsinfo-ksy36 ping @ksy36 labels Dec 28, 2023
@ksy36 ksy36 modified the milestones: needsdiagnosis, needscontact Dec 28, 2023
@ksy36
Copy link
Contributor

ksy36 commented Dec 28, 2023

Performance profile: https://share.firefox.dev/47BV7Ed

Note: Captured with Standard ETP

Tested on: • Browser / Version: Firefox Nightly 118.0a1-20230816094547 • Operating System: Google Pixel 5 (Android 13) - 1080 x 2340 pixels, 19.5:9 ratio (~432 ppi density)

[inv_33/2023]

thanks for the profile!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action-needssitepatch This web bug needs a GoFaster site patch. android 13 issues specific to android13 browser-focus-geckoview diagnosis-priority-p2 engine-gecko The browser uses the Gecko rendering engine priority-normal severity-critical The site or core functionality is unusable, or you would probably open another browser to use it. trend-pageload OKR Label - page does not load (blank page, error messages received, stuck in a loading state/loop) trend-perfprofile OKR Label - issues probably related to bad performance
Projects
None yet
Development

No branches or pull requests

3 participants