Gladys Assistant v4.10.2 is available with performances improvements and a clean DB button!

Hi everyone!

Today I’m releasing Gladys Assistant v4.10.2, a new release focused on performances and database cleaning.

Deleting device states history is no longer a blocking operation

When de-selecting the button “Yes, save states history” on a device, Gladys is cleaning the database from old states from this device.

It uses to execute this delete query in one batch, potentially saturating your disk if you have millions of states.

Now, Gladys is cleaning the database in small chunks of 1000 states, and makes a 100ms pause between each chunk so that your system can breathe, and Gladys can still feel responsive during the clean !

You can follow the cleaning of the database in the “parameters” => “Tasks” screen:

Add a clean database button

This is a bit more advanced feature for users who have large databases, and want to reduce the filesize of their database.

As you know, under the hood Gladys uses SQLite as a database.

SQLite has a VACUUM command, that reduce the filesize of the actual .db file on disk.

As this command is quite CPU/disk intensive, and is blocking (the instance is not available during the vacuum), we chose to add a manual button for users who needs to clean their DB manually once in a while.

We might code an automatic nightly task in the future, but we want this to be easy to disable in case you want your Gladys instance to stay up 100% of the time.

You can read the full CHANGELOG here.

How to upgrade Gladys?

If you installed Gladys with the official Raspberry Pi OS image, your instance will update automatically in the coming hours. It can take up to 24 hours, don’t panic.

If you installed Gladys with Docker, make sure you are using Watchtower. See the documentation.

With Watchtower, Gladys will update automatically.