GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
506 stars 55 forks source link

[Request]: metered network mode, power saving mode #419

Open GeopJr opened 11 months ago

GeopJr commented 11 months ago

Describe the request

per https://gitlab.gnome.org/GNOME/Initiatives/-/issues/42 per https://gitlab.gnome.org/GNOME/Initiatives/-/issues/43 per https://gitlab.gnome.org/GNOME/Initiatives/-/issues/44

What should Tuba do?

All of them apply to all 3 initiatives. The memory one has #179 too.

cc: @nekohayo

Implementation Details

nekohayo commented 11 months ago

A guess something that could be done is to use placeholders (CW-style) for image thumbnails and videos in data saver mode, that people have to click to display, though that might get tiresome fast in a content-rich context like social media. Maybe with an infobar that allows users to enable/override for the next hour/session?

I'm not sure autocompletions are CPU/data-intensive though?

nekohayo commented 11 months ago

Caching (issue #309) would probably do wonders for data savings too, though of course you end up with the problem of eating up disk space and needing to keep it lightweight (not gigabytes...) and clean up automatically periodically...

GeopJr commented 11 months ago

A guess something that could be done is to use placeholders (CW-style) for image thumbnails and videos in data saver mode, that people have to click to display, though that might get tiresome fast in a content-rich context like social media.

I agree, I'll see if using blurhashes (when available) is somewhat better

Maybe with an infobar that allows users to enable/override for the next hour/session?

+1 I was also thinking of settings to disable them completely

I'm not sure autocompletions are CPU/data-intensive though?

They are very network dependant, all autocompletions except for the emojis one send every character to the instance's search endpoint. The emojis one searches through the instances emojis that are already in memory

Caching

At the moment the memory impact will be much larger to be honest (until #179)

nekohayo commented 11 months ago

all autocompletions except for the emojis one send every character to the instance's search endpoint.

Yikes, that's very roundtrip intensive too; if you are not doing this already, may I suggest you use a typing-timeout-based activation instead, like what GTG does for search (and its syntax parsing in the editor)? i.e. wait at least 250ms (if not 400-500ms, even) after the user stopped typing the last character before triggering any query. Otherwise it sounds to me like you're essentially DDoSing the servers...

GeopJr commented 11 months ago

Sounds good!

FWIW, it matches Mastodon's behavior:

Screencast from 2023-08-01 01-44-11.webm