Welcome to WebmasterWorld Guest from 54.167.75.28

Forum Moderators: phranque

Javascript Frameworks Killing Browser & OS Performance?

This may be heresy

     
11:24 am on Jan 16, 2018 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator ianturner is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 19, 2001
posts: 3637
votes: 45


This is something I have noticed quite a lot recently - my browser becomes unresponsive after it has been open a while - in addition to this my OS is becoming unresponsive.

Now my first though was that my machine was getting a bit old and the Windows updates were killing performance - but no, a bit of investigation led me to looking at memory - it was all being used by Google Chrome.

No I use chrome and keep lots of tabs open - and have loads of bookmark folders to fast open a lot of tabs. Watching memory usage by chrome I see it steadily increase over my working day - 1Gb, 2Gb, 3Gb .... I know this didn't use to happen 3-4 years ago with the same number of tabs, so I can only think that the new javascript framework (angular.js, react.js etc) based sites are eating memory with their polling, notifications and listeners to the point that the browser becomes unresponsive. I get loads of 'do you want to wait for this page to respond' pop-ups in Chrome too.

I need to do some investigation to see whether this issue is Chrome specific or whether other browsers are being as badly affected - but has anyone else seen similar behaviour recently. (I know it is probably heretical to say anything against javascript frameworks at the moment)
11:37 am on Jan 16, 2018 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 25, 2005
posts:1656
votes: 238


While overuse of javascript frameworks is certainly an issue, my experience with Chrome slowing down is that it's usually due to rich media, particularly excessive advertising, videos and large images. I have a pretty good CPU and plenty of RAM but the GPU is not too impressive. I don't think frameworks are big RAM eaters per se, although it's possible there are memory leaks or memory is poorly managed by them.

What kind of hardware are you on? Having lots of tabs open is akin to running many programs simultaneously, so you'll need ample RAM.

Daily Mirror is a good example of a website that is likely to bog down even a fast computer. I don't recommend visiting, though, for many reasons ;-)

[edited by: robzilla at 11:44 am (utc) on Jan 16, 2018]

11:44 am on Jan 16, 2018 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Nov 16, 2005
posts:2747
votes: 110


Yes, definitely. We are using our enormously powerful computers to get away with doing things in incredibly inefficient ways and sometimes it backfires.

It is worse with web apps because of the attitude that its client code so its not sucking up your CPU - after all we know that modern clients have plenty of resources to spare, right?

I consistently find browsers use more memory and CPU than any other everyday software (obviously if you are gaming, or doing heavy numerical stuff, its different).

It sometimes helps to use mobile versions of sites even on desktop. Try the mobile version of twitter - it is m uch faster
4:41 pm on Jan 16, 2018 (gmt 0)

Junior Member from CA 

Top Contributors Of The Month

joined:Mar 2, 2017
posts:48
votes: 5


Certainly, javascript frameworks can affect your website performance in a good way if using properly or in a bad way if NOT using properly. I remembered I have to fix a website where a web developer was pulling more than 100,000 records from a REST service and he was displaying only 20 records :). Funny eh? So even though users were able to see only 10 records, 100,000 records were hidden in that page.
I would say, it is NOT just about the framework, it's about how we are using them. I know for a fact that angular and react are frameworks supported for a huge community and if something gets wrong using them, I would blame the web developer in charge before blaming those type of frameworks :)
7:38 pm on Jan 16, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:14426
votes: 576


We are using our enormously powerful computers to get away with doing things in incredibly inefficient ways and sometimes it backfires.
All the upvotes. Remember when each application had its own memory ceiling, and it was the developer's job to ensure that it didn't keep eating up memory, or else it would eventually crash? Now it's the ### Tragedy of the ### Common. Gobble, gobble, gobble, there's always more RAM where that came from. Or, as my father used to preach, extra memory is cheaper than good programming.
10:49 pm on Jan 16, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:7995
votes: 578


With all these new "gizmos" ram is getting gobbled up by leaps and bounds ... and those running MANY tabs will see the worst side of that. These days even FF sets a new instance for each tab in the interest of security. Pretty sure many will laugh at me, but I never have more than four (4) tabs open at any time.

I also close the browser every six or eight hours and start over again.

As for js, I have that disabled, only whitelisting where it is absolutely essential -- and that doesn't happen very often.