A point being overlooked by article and commenters: the records in the registry probably use in the order of 10-100 bytes each, while every actual file takes up at least around 1024 (EDIT: maybe more like 4096?) bytes. Putting tiny 'files' into a special format is a no-brainer on the older computers that existed when the Registry was first created. I am assuming this was one of the motivations to create the Registry…
Extracted from the "Rationale" section of https://en.wikipedia.org/wiki/Windows_Registry 1) Since file parsing is done much more efficiently with a binary format, it may be read from or written to more quickly than a text INI file. 2) Strongly typed data can be stored in the registry, as opposed to the text information stored in .INI files. 3) Because user-based registry settings are loaded from a user-specific path…
Why the Windows Registry sucks technically (2010)
281–290 of 342 posts
Re: Why the Windows Registry sucks technically (2010)
#282Re: Why the Windows Registry sucks technically (2010)
#283I really appreciate when people use technical facts to criticize something, like with this. It is a well written take-down of the implementation of the Windows Registry as of both today and 2010. I suspect if the concept of the registry was created today it would look more like a database (e.g. Sqlite), although organizing it like a virtual FileSystem does have a certain appeal, and unfortunately I don't know of a da…
I think you might mean relational database. IIRC, the registry is already a database, just not a relational one.
Re: Why the Windows Registry sucks technically (2010)
#284I really appreciate when people use technical facts to criticize something, like with this. It is a well written take-down of the implementation of the Windows Registry as of both today and 2010. I suspect if the concept of the registry was created today it would look more like a database (e.g. Sqlite), although organizing it like a virtual FileSystem does have a certain appeal, and unfortunately I don't know of a da…
I'm a big fan of the macOS method where there's an OS API to manipulate the user defaults (as its called) but they are actually just stored as files in a standardized format (usually XML). You get the pros of the standardization and the pros of user manipulation (like easily deleting the corrupted settings of some app by removing one or two files)
GNOME has the gsettings command for this, which is the equivalent of the `defaults` command in macOS. Many guides still refer users to the `dconf` command, though, which is technically a lower-level tool but basically does the same thing for 99.999% of GNOME installations. (Users/distro-makers can actually choose the storage format on GNOME's case.)
Re: Why the Windows Registry sucks technically (2010)
#285Earlier quoted context omitted.
.config/ and .local/ are the de facto /etc for users, but there is the set of XDG_ environment variables that are intended to fill that role.
Well, my git, ssh, caches of what not, almost everything is in my home directory directly. It's even worse than "My Documents"
Re: Why the Windows Registry sucks technically (2010)
#286I think one of the key innovations of unix was the unix filesystem and the way it made everything one tree, one unified interface for everything is an amazing concept, In fact I think that the real innovation of unix was it's simplicity. now later this was messed up (yeah berkeley, I am putting most of the blame for that on you) with sockets, sysctl, etc. Or in short every unix interface that ignores the one true API, the filesystem(which is for the most part open, read write, seek, close)
In conclusion, whenever I see a tree but whoever made it decided that no, we are a special snowflake, and are not going to attach this tree to the main tree of data on your system(the filesystem) it bugs me. The rogues gallery here include gnome config, sysctl, dbus, and yes the windows registry.
Re: Why the Windows Registry sucks technically (2010)
#287Earlier quoted context omitted.
> Manually editing the registry though... That way lies madness. It's much scarier and it's much more fragile. How... exactly? There's no way to create a syntax error as trivial as you can in config files. How is using regedit or powershell commands more fragile (I understand "scarier" in a way everything you're not used to is scary).
Well the article points to a way of preventing following entries to be read by having an entry in non alphabetical order. But how often have you ran into syntax errors for system configuration files in Linux? I can't say that this has been much of an issue in my experience.
Re: Why the Windows Registry sucks technically (2010)
#288I really appreciate when people use technical facts to criticize something, like with this. It is a well written take-down of the implementation of the Windows Registry as of both today and 2010. I suspect if the concept of the registry was created today it would look more like a database (e.g. Sqlite), although organizing it like a virtual FileSystem does have a certain appeal, and unfortunately I don't know of a da…
Re: Why the Windows Registry sucks technically (2010)
#289Earlier quoted context omitted.
I do wonder what RegEdit.exe does here. Does it infer encoding, have a long list of key-to-encoding mappings, or a combination of the two? I did a bit of experimentation on this too and we think it has a heuristic to guess encodings of strings. (Which to be fair isn't a terrible idea - it's very easy and almost entirely reliable to determine if a string is ASCII/UTF-8 or UTF-16LE which are the major encodings found.)
Based on the documentation[1], it seems clear that strings are stored in Unicode (which should be UTF-16LE). If the data has the REG_SZ, REG_MULTI_SZ or REG_EXPAND_SZ type, and the ANSI version of this function is used (either by explicitly calling RegGetValueA or by not defining UNICODE before including the Windows.h file), this function converts the stored Unicode string to an ANSI string before copying it to the b…
Re: Why the Windows Registry sucks technically (2010)
#290Earlier quoted context omitted.
The problem of removing applications together with their configurations is trivially solved in the various Linux-based systems where any software package is installed only inside a private directory. Any files that would be expected to be in shared directories like /usr/bin, /usr/lib or /etc, are replaced by symbolic links. Except for symbolic links, the installation of a package must not change anything outside its…
You can do similar on windows. However, the registry was turned into trying to solve a slightly different issue of roaming users, and centrally managed settings, split by machine and user, and using what became active directory. They started off with OLE and its central store of holding name value pairs in a tree. Basically making the registry do at least 4 different things. Only one of them it does 'ok' (COM/OLE loo…