GNOME Bugzilla – Bug 701476
keyfilesettingsbackend: don't write keyfile to disk after every change
Last modified: 2018-05-24 15:23:04 UTC
GKeyfileSettingsBackend writes the keyfile to disk after every single change. This causes a lot of writes to happen if you set many settings after each other. To fix this I propose to only write the keyfile to disk after a small timeout (currently 5 seconds). I've attached two patches that implements this approach.
Created attachment 245877 [details] [review] gsettingsbackend: add g_settings_backend_sync() g_settings_backend_sync() can be used to explicitly sync a specific GSettingsBackend.
Created attachment 245878 [details] [review] keyfilesettingsbackend: delay writing of keyfile We use a timeout to only write changes after five seconds. This way multiple changes close in time are coalesced and only cause a single write to disk.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/710.