Android also consolidates network requests from multiple apps to reduce the overhead of waking up the network hardware (i.e., Android doesn’t instantly provide a network connection whenever an app asks. Different apps are given different priorities.)
Android operating system has a “Do Not Disturb” feature in settings. It keeps the phone notifications quiet while you’re trying to sleep.
Personally, I have mine set for 12AM-8AM.
Presuming there’s no need for a syncthing to be synchronizing anything while you’re sleeping for those eight hours it would be nice to put syncthing to sleep or pause all synchronization functions while the phone is in do not disturb mode.
If syncthing had in its settings, an option to respect the do not disturb feature of Android, syncthing would automatically save battery power during those eight hours by remaining quiet.
As soon as do not disturb time is turned off or expires let the software resume its normal synchronization.
It would be tedious to have to pause all folders and all synchronization manually every night and then remember to turn them all back on again in the morning. I normally just exit the software program at night for this reason.
Also, when I’m not at home because there’s nothing to sync with. If I’m not attached to my home Wi-fi I don’t the software consuming any battery.
What do they maintainers and developers think?
Would it not make sense to add to the settings menu the option to observe the Android do not disturb operating system feature?
While do not disturb is enabled do nothing otherwise run normally.
I guess relying on android power management is enough then.
If there was interest to reduce power usage furthermore, an idea could be to implement a kind a scheduler in syncthing, something like : wake-up once every xx hours. This would unpause all folders & activate network and start syncing.
This, or maybe it’s completely overkill
In all cases, syncthing is a really really cool tool, thank you for all the work!
There is still power consumed because, e.g. by default folders are rescanned every hour and connections between devices need to be maintained. You can mitigate the former by setting a higher rescan interval and relying mainly on file watching to detect changes instead. I personally like to use a rescan interval of 1 day.
I’d suggest running Syncthing on your phone only on the day that you need to sync with Linux. I sync this way too. For me, I don’t have anything to sync more than once per day, so I launch the app, let it sync, and then exit the app for another day.
No reason to leave any software running on your cell seven days a week if you only use it one day per week.
My thoughts is that this would be a misfeature. The “Do Not Disturb” feature is for turning off disturbances i.e. for making the phone neither beep nor vibrate or activate its screen as a resuslt of stuff happening. It’s useful for things like sleeping, working, or periods of time where you for whatever reason don’t want to be disturbed.
But it’s not intended as a “no need to synchronize” clue, and having things magically apparently stop working for no rational reason increases confusion for no good reason. I predict if we had this feature, we’d get support-questions from users confused by why, when they set up syncthing on their phone prior to going to sleep, the phone STILL hadn’t synced the next morning. Is it really that sloooooow??? etc.
OK, I see your point. The software itself could have a setting for the hours for which it’s going to synchronize and which hours it’s not going to synchronize just like a backup software program would do. What the software could do inside settings is tell it when not to sync.
There is already a perfect place to put this setting.
“Enable run conditions”
Create a new time table setting that tells Syncthing what hours to use.
Very simple and straight forward solution that won’t create any questions at all for support.
You can already choose between running or not running on Wifi, running on mobile data or not running on mobile data, why not put a time schedule in there also?