The official client uses push notifications as the source of truth and only polls ETags for folders whose account has NO working push channel. FolderMan::slotEtagPollTimerTimeout (src/gui/folderman.cpp:1131) filters:
std::copy_if(..., [](Folder *folder) {
const auto account = folder->accountState()->account();
return !pushNotificationsFilesReady(account);
});
So a folder with live push is never polled on the interval; polling is the fallback for accounts without push.
Current state in nextsync-rs: scheduler.rs arms RemoteInterval whenever remote_interval_enabled is on (scheduler.rs:1185-1190), with no knowledge of whether the account push channel is connected. Every interval fires a full RemoteInterval sync for every folder even when notify_push is delivering changes in real time. Wasteful: a full reconciliation each remote_interval_minutes on top of real-time push.
Proposed work:
- Let the account runtime tell the folder schedulers whether the push channel is ready (the push client already emits state via
store_push_state).
- In
request(), downgrade/skip RemoteInterval while push is ready for that account (keep RemotePush as the real-time trigger).
- Keep
RemoteInterval as the fallback when push is disabled, not offered, or disconnected (matches the official behaviour and our OpenCloud accounts, which have no push).
Related: #183 (file-id resolution) shares the goal of not re-syncing folders with no changes.
The official client uses push notifications as the source of truth and only polls ETags for folders whose account has NO working push channel.
FolderMan::slotEtagPollTimerTimeout(src/gui/folderman.cpp:1131) filters:So a folder with live push is never polled on the interval; polling is the fallback for accounts without push.
Current state in nextsync-rs:
scheduler.rsarmsRemoteIntervalwheneverremote_interval_enabledis on (scheduler.rs:1185-1190), with no knowledge of whether the account push channel is connected. Every interval fires a fullRemoteIntervalsync for every folder even when notify_push is delivering changes in real time. Wasteful: a full reconciliation eachremote_interval_minuteson top of real-time push.Proposed work:
store_push_state).request(), downgrade/skipRemoteIntervalwhile push is ready for that account (keepRemotePushas the real-time trigger).RemoteIntervalas the fallback when push is disabled, not offered, or disconnected (matches the official behaviour and our OpenCloud accounts, which have no push).Related: #183 (file-id resolution) shares the goal of not re-syncing folders with no changes.