Thursday, December 21, 2017

Why is the Intertubes so slow?


Well, of course it is all those others using it.

The other answer is crappy programming on the server side. And on the client side.

Apparently you need an Advanced Degree(™) to do better.

Here's what I mean:

Yes, I'm a Mac User. No, that's not the cause. Except that it is, slightly.



The above image is "Activity Monitor". You can see that the top two *busiest* users of CPU cycles are Safari and Firefox. Everything else is essentially zero, or idle. When a process is ~100%, that means it is saturating a cpu core, and can't do any more.

But those two are busy doing something, and that something makes them fairly unresponsive to what I want them to be doing. (I acknowledge that some of the problem is that while I'm typing this blog, Blogger is busy trying to help me by doing on-the-fly spelling check, which means there's a background process that is sending/receiving content to/from somewhere far away, and that ties things up a little. That help is nice, but I'd rather throttle it back--remember that I am on satellite internet now…)

What are those two up to?

Bad programming. Well, bad websites, and then bad web-broswer. Those numbers are while the browsers are "idle", too. So what are they doing?

Unfortunately, it's hard to find out because the cpu-usage reporting does not go down to the individual-lightweight-thread level, so I can't know which specific open window (URL) is causing the problem. 

But it's a near-certainty that EBAY and AMAZON are the two likeliest culprits, because they are the pages that have the never-ending-animation content. There are probably other URLs that are worse, but ones I don't visit.

Also, look at the real-mem size. Safari is 15GB?  a pig. This is the same problem that Firefox has, too, about lightweight threads that haven't been terminated and not closing file resources.

Which means that we have web-pages that aren't really 100% closed, even if I closed the window/tab. Files aren't close, and the resources that were loaded (images) are still using memory.

Some of the problem is that on this machine I'm on an old OS, Mountain Lion (10.8). Going to bump it up to Capitan (10.10) in ~3 weeks. I don't expect that is going to fix the issue.

But the problem starts with website creation work that insists on putting animation all over. I personally prefer much simpler pages that have no such thing. These animations that force me to see them are offenses of their own. 

You can dodge some of this via things like FlashBlock (Flash use to be THE WORST about this). But that only solves Flash, what about the animated GIFs? No solution I know of.

I agree that newer OS should have some better-behaving Safari in it. And newer machine would help, except that this machine is already ridiculous fast:



So there are problems in browsers: unclosed resources that are dangling, AND mediocre javascript engine. 

Apple is not guilty of these problems in Firefox, but it IS guilty of them in Safari.

All this animation needs to be halted. At least with FlashBlock I could then choose to play something or not.

What I end up doing now is watching URLs that are these criminals, and adding them to etc hosts.

THIS IS NOT TO HARD TO SOLVE, PROGRAMMERS!


[Next day: "Safari Web Content" seg-faulted and killed Safari completely. Geez this is dumb.]

----

If I quit and restart Safari or Firefox, that cpu number goes down to 10% or something like that, then is slowly creeps up again. At 100% the browser is unresponsive, so I'll be ok until I hit that again. But this is ridiculous.

Garbage on the server side causes this, and bad programming on the client/browser side makes it worse.

It's my understanding that javascript is now compiled on the fly, which didn't used to be the case, so it's at least not running slow by being interpreted still. That was never good, just easy.

---

Another issue about why Blogger is problematic: it wants to do this auto-save for you, and as I am on satellite, that fails a bit too often…and then it is stuck in a different way. It might recover in a few minutes, but it is at the same time trying to do the spelling check, so who knows?


Almost enough to make you want to go back to Lynx.

No comments: