Categories
rants

Typing lag on linkedin sucks.

UPDATED

I finally figured out what was wrong with LinkedIn. I believe they are using React. I think this is why they are hiring so many React Developers.  It slows down if you leave the tab open, or use it too much.

Javascript is not for building pages and apps. Javascript is for manipulating the DOM and enhancing the user Experience.  Regardless of how good you think you are, building an entire app with Javascript is not a good idea for many reasons.

Single page apps suck to maintain don’t believe me read this

[RANT]

React is hype and  coolism

I just wanna be a cool kid too.

All the cool kids are using it it has to be teh most bestestes.

Twitter uses React too. It crashes so bad in Google Chrome on Ubuntu that you have to restart Ubuntu to get Chrome working again. No smart guys restarting Chrome doesn’t work.

Apparently Ubuntu doesn’t regulate how much ram browsers or anything can use so React nomnoms it all up and crash goes the browser.

These issues were due to using LinkedIn for too long in a tab.  I now open it, do some stuff really quick and close it. No more issues, that is part of how I came to this conclusion too. I eventually learned this stops Twitter from crashing too. With React you have to close the damn tabs to get performance. SWEET!

The story

For a while I kept wondering why linkedin comments, posts etc. would get very sluggish when I typed. Other things were slow too.

Typing lag on linkedin

So laggy and slow I often have to just stop trying for up to a minute while Linkedin code catches up. Why does it constantly pause while I am typing?

Don’t believe me? Watch this.  At about 29 seconds you can see it looks like I am not typing. I am still typing it is just not responding and lagging.

[/RANT]
Why do React sites suck?

Because React is Javascript building and updating THE ENTIRE FRONT-END .Read why we need to stop using react. Very good points I won’t bother repeating in there. It also isn’t just React it is all Javascript frameworks used to build Single page apps. It is just how the hardware works.

Single page apps are a MAJOR JUMP IN TH WRONG DIRECTION.

Think for a second how many objects an entire page’s DOM  contains, then the other javascript objects and all of the things that are firing off like events etc. There is really a hell of a lot going on and all of that is getting crammed into a users limited phone RAM. Phones are just tiny computers.

One problem with React and  Functional javascript framework/libraries is Functional Javascript EATS THE LIVING HELL OUT OF MEMORY. I mean NOMNOMS THAT SHIT.

React likes NOMNOM RAM

The reason Functional programming eats so much ram is because every time you do something an object is created. If the state of that object changes a new object is created from the old object and the old one is often preserved at least for a certain amount of time.

This creation uses cpu and ram, which phones are really limited on. Most developers use a laptop or PC so they think their code is wiz bang fast. When in reality it is often dead ass slow.

You can’t predict if the persons device has 2Gb ram or 256mb of ram. You can’t predict if they have tabs open etc. So you should try to use as little of it as possible.

All of the lost lessons

The Tech industry is partly to blame for this with all of their greed.  They used to find smart people. Pay to move them. Pay for their college etc. Seriously they used to do this.

Then they got greedy, the tech industry wanted cheap programmers. In order to get cheap programmers programming had to be made easier and faster for people to learn. This gave birth to all of the fads of Javascript built frontends. Javascript frameworks started popping up left and right, overnight. Then Javascript on the server and NoSQL to name a few. It became a race to the bottom quickly and now we get slow and crashing websites as a result.

All of this has been a turn in the wrong direction. A leap backwards. Long ago programmers and engineers learned the treacheries of using NoSQL 

More on the history of SQL and NoSQL.

Many years ago we learned that overly using Javascript in the browser was a bad idea.

Too much Javascript in the browser

We learned that it slowed down the more you used it. It was once a best practice to use as little javascript as possible, you only animated things and updated stuff. Now people are building entire complex sites with Javascript?

I just can’t…

The computers of a decade and two decades ago are the phones of today. The old computers slowed down, the phones slow down now. Maybe not the super expensive newest of phones, but most of your uses will not have the best phone and assuming so is stupid.

Phones and browsers have limited ram. Your app shouldn’t be eating it all.

Categories
Resources Web Development

React information and resources

Why you shouldn’t use inline styling in production React apps

Why you should use refs sparingly in production

Do React Hooks Replace Redux?

Videos

Learn REACT JS in just 5 MINUTES (2020)


JavaScript for React Developers | Mosh