Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 23 Oct 2018, 17:07
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Javascript pro needed to find why a script is so slow
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
linuxcbon

Joined: 09 Aug 2007
Posts: 1197

PostPosted: Wed 03 Oct 2018, 08:44    Post subject:  Javascript pro needed to find why a script is so slow  

Hi,

in any browser open news.google.com
when you select on the left side a topic like world , business, technlogy
it takes like 5 seconds to open the page

I tracked down the slow script to be
https://www.gstatic.com/_/mss/boq-dots/_/js/k=boq-dots.DotsSplashUi....
or some scripts in gstatic.com

But who is able to find what functions or parameters inside that script is the problem ? Someone professional in javascript is needed. It doesnt seem easy to debug that code.

Smile
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11177

PostPosted: Wed 03 Oct 2018, 09:05    Post subject:  

Well look at the page source...grab ALL the javascripts and CSS (a script language also) it desires and see how you probably have a meg or three of script that wants to sit there using the cpu 'just in case' as most functions are not used. The functions that are are often inefficient loops. Scripting is generally slow as it has to be interpreted on the fly unlike compiled code.
Then the browser has to try and act on what the scripts tell it to do which often involves awkward rendering tricks...so three virtual operating systems on top of the actual operating system and you may begin to see why its a miracle this stuff runs at all.

I have looked at such as blocking using the hosts file to cut out scripts that are only for data harvesting and advertising...eg google syndication and facebook for example...not to mention unnecessary web fonts.

Cleaning up this crap is no easy task though.

Hope that gives some clues

Mike
Back to top
View user's profile Send private message 
8Geee


Joined: 12 May 2008
Posts: 1700
Location: N.E. USA

PostPosted: Wed 03 Oct 2018, 11:11    Post subject:  

I had some giggles there (just that main page)... it took over 45 sec. to load with 2 dialog boxes that a script had become unresponsive at line 67 and line 45. Stopping the script, since its Google. And furthermore, at the lower right of each headline blurb, is written UP-arrow button. But on some blurbs this is written upside down and backwards.

Boy, that Google sure does hire pro-fessional coders!

Razz Razz Razz Twisted Evil

_________________
Linux user #498913

Some people need to reimagine their thinking.
Back to top
View user's profile Send private message 
linuxcbon

Joined: 09 Aug 2007
Posts: 1197

PostPosted: Wed 03 Oct 2018, 12:47    Post subject:  

Yeah it's bad written and slower than a snail... Confused

I dont know where to send the bug report for google to solve.
They need to solve that *** Confused
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0352s ][ Queries: 11 (0.0094s) ][ GZIP on ]