3 ms·
Performance and footprint. If I remember correctly, the binary format is used so that dconf can mmap the configuration into memory. This means that a read on th
by wlach 15y ago
Performance and footprint. If I remember correctly, the binary format is used so that dconf can mmap the configuration into memory. This means that a read on the configuration database doesn't involve any system calls and only one copy needs to be in memory (no matter how many processes are using it).
http://live.gnome.org/dconf#Design http://live.gnome.org/dconf#Design
I'm generally a fan of text-based configuration files but in this case I think the benefit exceeds the cost. Reading configuration used to take a non-trivial amount of time on startup.
- cpeterso 15y agoIs reading configuration files really such a slow yet common operation that it is a real performance bottleneck? If a GNOME login requires "thousands of dconf reads", perhaps they should modularize and lazy-load some of those settings. (Or not use IPC to query a config service.)
- dredmorbius 15y agoThe proper way to do this is to maintain a text file for reference, check it for modifications, and keep the machine-preferred format elsewhere. Best of both worlds: rapid parsing / memory management (really, does it matter that much), while preserving human management. Oh yeah: and the textual version is definitive.
- rbanffy 15y ago> Performance and footprint One way out would be to compile the text-based config files into the config blob and rebuild the blob if the text-based config files change. I can't quite figure out an attack vector, but I always have a bad feeling when I trust a binary blob and load it into memory without any parsing.
- Zak 15y agoFor some reason, gnome-settings-daemon reads ~/.thumbnails on login, and ~/.thumbnails was unbounded in size. Mine was 700M when I learned what caused all the disk IO. I think a lot of the perception of text config files being slow may have more to do with that than the actual performance of the configuration system. The middle ground would be to cache settings in a binary file.