Web Surfing and Battery Life

I am using Haku B5 on a laptop and for the 1st time websurfing for me is enjoyable on Haiku. I use mostly Falkon for it’s wide compatibility but I do love Webpositive. One thing I’ve noticed is that after being on the web for a bit, in either Webpositive or Falkcon. The laptop will get pretty warm and the fans start to sound like they are ready for takeoff. I am just curious as to what is happening here. I didn’t know that surfing the web could be so processor intensive. I can watch my battery drain in real time.

I want to stress. I am NOT complaining. I know that things are not fully baked/optimized yet. I am ecstatic I can actually websurf on Haiku. I’m just curious as to what is going on… that is all.

thanks

Yes, not beeing optimized is one problem. Not using hardware compositing for some 2d planes is another (we use software rendering only).

But, on a related note: are you blocking advertisements (and spyware)?
On many modern websites advertisements make up a huuuge chunk of the bandwidth and executable code a website sends, and this basically only works against you. For some reason websites refuse to use content-specific advertisements and instead try to target based on the person, which is hugely cpu intensive.

What I am doing currently (on Haiku), untill we have the proper webkit webblocking api is to simply blacklist those servers on a DNS level, to do this i’ve installed a hosts file from this project: GitHub - StevenBlack/hosts: 🔒 Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories.

You can use this for the file at /system/settings/network/hosts,
Ideally back up the previous one so it is easy for you to uninstall again if you don’t want to have it anymore

2 Likes

Thank you,

Follow up question. Does 2d accelerated compositing require 3d hardware accelerated drivers?

Also, have a look at CPU usage, either with ProcessController in the Deskbar tray, or put a replicant of ActivityMonitor or Pulse on the Desktop. There are some websites that - at least when view with Web+ - peg a CPU.

Github is the most prominent offender for me. I now write a ticket description in a separate text editor and only quickly call up the Github site to copy and paste the text. Otherwise I’d have to endure the fan going into overdrive…

1 Like

In theory no, but in praxis yes. This is because modern gpus don’t have dedicated 2d acceleration paths without 3d acceleration.
And for those that do we don’t have any drivers, and since those are usually older devices we are unlikel to get those drivers noe.

1 Like

Thank guys, I was just curious. Someday we will get those 2d/3d drivers. I am enjoying Haiku just as it is for the time being. Have a great day.

Donald

Github may be jet another instance of it spamming the javascript console.

Is there messages there for you that repeat?

Thanks, that host file has made a notciable difference.

No console flodding. It’s tracked in this ticket: #18529 (WebSocket thread sometimes pegging a core on GitHub) – Haiku

1 Like

I’m using Web atm for github as that one doesn’t seem to trigger this, on WebPositive and Falkon the laptop goes into turbo mode also on one CPU, Akregator also suffers from this, this wasn’t the case on beta4.

No need to guess :slight_smile:

It is related to web sockets. The implementation of web sockets in Web+ has been broken for a very long time, with no one interested in fixing it. It is pretty trivial socket code (open a tcp socket, and then read and write data to it, until the socket is closed).

In the current code, something closes the socket but does not stop trying to read from it, or something similar. As a result, we get a CPU core used at 100% by codfe trying to read/write from a socket over and over and getting only errors because the socket is closed.

1 Like