Skip to content

Reduce update check frequency #2398

@beanow-at-crabnebula

Description

@beanow-at-crabnebula

As of PR #2301 we've seen about 2.4 million requests (in 4 days) checking for updates.
Which you can check now too on the new Cloud Insights page 📊

I believe the cause is the 5 second interval for checking for updates.

tauri::async_runtime::spawn(async move {
loop {
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
job::check_and_download_update(&handle).await;
}
});

I'd suggest slowing this interval down substantially.
For example, on app startup + every 1 hour.

 tauri::async_runtime::spawn(async move {
     loop {
-        tokio::time::sleep(std::time::Duration::from_secs(5)).await;
         job::check_and_download_update(&handle).await;
+        tokio::time::sleep(std::time::Duration::from_secs(3600)).await;
     }
 });

Some back of the envelope math.

Interval 5 sec 15 min 1 hour
Requests in 30 days
x 100 users
51.8M 288k 72k

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions