After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 701476 - keyfilesettingsbackend: don't write keyfile to disk after every change
keyfilesettingsbackend: don't write keyfile to disk after every change
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gsettings
unspecified
Other All
: Normal normal
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-06-02 18:58 UTC by Carl-Anton Ingmarsson
Modified: 2018-05-24 15:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsettingsbackend: add g_settings_backend_sync() (2.24 KB, patch)
2013-06-02 18:58 UTC, Carl-Anton Ingmarsson
none Details | Review
keyfilesettingsbackend: delay writing of keyfile (5.12 KB, patch)
2013-06-02 18:58 UTC, Carl-Anton Ingmarsson
none Details | Review

Description Carl-Anton Ingmarsson 2013-06-02 18:58:14 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.
Comment 1 Carl-Anton Ingmarsson 2013-06-02 18:58:16 UTC
Created attachment 245877 [details] [review]
gsettingsbackend: add g_settings_backend_sync()

g_settings_backend_sync() can be used to explicitly sync a specific
GSettingsBackend.
Comment 2 Carl-Anton Ingmarsson 2013-06-02 18:58:20 UTC
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.
Comment 3 GNOME Infrastructure Team 2018-05-24 15:23:04 UTC
-- 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.