rafatosta / zapzap

WhatsApp desktop application written in Pyqt6 + PyQt6-WebEngine.
https://rtosta.com/zapzap-web/
GNU General Public License v3.0
143 stars 6 forks source link

Zapzap consumes 1.0GB of RAM #243

Open christiantosta opened 2 days ago

christiantosta commented 2 days ago

The app is amazing, but that is a problem: it's consuming so much RAM on my Fedora 41 Desktop. Perhaps the Chromium part used by PyQt6WebEngine.

Keep a look at this as one alternative web engine: https://github.com/sailfishos/qtmozembed Other alternative can be treat HTTP traffic with Python/C++ on the backend level and render the interface using Kirigami.

image

rafatosta commented 1 day ago

Memory use depends on the use and this is managed by WhatApp Web. Many conversations and interactions make cache increase to avoid locking and drop in messaging performance.

In addition to having relatively high consumption at the initial moments because of synchronization, regardless of whether or not it has ended.

As I use only for exporadic messages, it does not consume that much. image

It is possible to limit the amount of RAM to be used by ZAPZAP, but I do not know the impact of this on daily use. A possible reduction will surely be well regarded by the "RAM worshipers", but will be unstable.

rafatosta commented 1 day ago

This practically prevents consumption increasing, but made Zapzap very slow. Anyway, maybe I put this option as customization and let the user's discretion activate or not.

image

christiantosta commented 15 hours ago

In another machine with another account (sporadic messages), same occurs:

image

Same account on firefox tab:

image

rafatosta commented 13 hours ago

In another machine with another account (sporadic messages), same occurs:

image

Same account on firefox tab:

image

Consumption is normal!

You compared a page with the full app running. Of course, the page will consume less memory. You need to consider everything that Firefox needs to execute to run Whatsapp Web.

Not wanting to belittle your comment, but nowadays an app consuming 1Gb due to heavy use is not a problem.

I understand that for more modest machines this may interfere, but all of Zapzap's development was done on a modest machine, a 7th generation i5, RAM 12Gb that was 7 years old. If it works well for me, it will work well for most users.