7 ms·
I don't feel like this article is good enough to be worth resharing 12 years later. It missed some of the key reasons why the Registry is bad and other critici
by greenthrow 4y ago
I don't feel like this article is good enough to be worth resharing 12 years later.
It missed some of the key reasons why the Registry is bad and other criticisms ("We have to write exactly the bytes Windows expects." yeah of course you do. It's only meant to be changed using APIs.) are not very well thought out.
The criticism that the Registry is a janky filesystem in a single file is dismissed because you can do the same thing with ext3. That's not a good reason to dismiss it. Just because you can do a similar thing doesn't mean it is a good thing to do for the Registry. The Registry being a single file is a cause of a ton of problems, and is IMHO the root of all the other problems. If this were a better technical article it would go into that instead of hand waving it away. (E.g. it being a single file leads to the all or nothing nature of it. It necessitates the bad filesystem implementation instead of using the actual underlying filesystem, etc.)
- jaclaz 4y agoActually the Registry is not a single file, it is a set of files virtually assembled into a single "object" that has many points in common with both a database and a filesystem. Personally I see it more like a filesystem, with some striking resemblance to NTFS.
- greenthrow 4y agoIt is a single file to the underlying filesystem. Yes it reimplements a filesystem, I already said that in the comment you are replying to.
- helloooooooo 4y agoIt isn’t a single file. There are multiple “hives” to the registry. There is at a minimum the SECURITY, SAM, SYSTEM and BCD “hives” that are all individual files on disk. Additionally, individual UWP apps can have their own isolated hive if need be.
- magicalhippo 4y agoRelated documentation: https://docs.microsoft.com/en-us/windows/win32/sysinfo/registry-hives https://docs.microsoft.com/en-us/windows/win32/sysinfo/regis...
- jaclaz 4y agoExactly like a NTFS drive can have mountpoints that are actually other drives, the Registry on disk is made by several files, at least: SAM SECURITY SYSTEM SOFTWARE NTUSER.DAT and since Vista BCD The whatever is called the Registry when virtually assembled together is accessed as if it was a filesystem on a single file, is not in itself a "file", it is something else, or if you prefer it seems like being a monolithic file but it is backed by a number of separated files.
- samstave 4y agoIts a "view"
- mkup 4y agoIt's far from being a single file. Registry is split to hives. Besides that, each hive is a bunch of files (actual hive, a pair of integrity logs - which was just one log file before Vista - and hell knows what else, some KTM-related stuff I presume): > dir /a C:\Windows\System32\config ... 29.07.2022 12:33 44 040 192 COMPONENTS 21.11.2010 10:21 1 024 COMPONENTS.LOG 29.07.2022 12:33 262 144 COMPONENTS.LOG1 14.07.2009 05:34 0 COMPONENTS.LOG2 29.07.2022 12:33 65 536 COMPONENTS{016888b9-6c6f-11de-8d1d001e0bcde3ec}.TM.blf 06.03.2021 21:44 524 288 COMPONENTS{016888b9-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000001.regtrans-ms 29.07.2022 12:33 524 288 COMPONENTS{016888b9-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000002.regtrans-ms
- iforgotpassword 4y agoIt sounds you misunderstood at least parts of the article. The ext3 comparison doesn't support or dismiss anything, it's to explain how there can be a filesystem in a file. They then go ahead and say how it could be a good single-file format if it were more database-like instead of filesystem-like. Other criticism of the format clearly take into account that it's a historically grown format which explains some of its idiosyncrasies, but that still doesn't mean it's not valid criticism. Especially the mentioned inconsistencies regarding data types and encodings can hardly be attributed to the registry being single-file, as you seem to suggest by saying "The Registry being a single file is a cause of a ton of problems, and is IMHO the root of all the other problems."
- greenthrow 4y agoI didn't misunderstand anything. I read this in 2010 and just re-read it. The ext3 example is used exactly as I describe, to hand wave away "having a file system in a single file" as a criticism and just move on to talking about nitpicks with the Registry's implementation of a filesystem in a file, while ignoring that all of the problems with the registry spawn from the choice to have it be a filesystem in a file. This article is like going to a house that burned down and saying "well yes, the house burned down. But barns also burn down. Now see one problem is that the couch is a pile of ash and cinders. These materials do not make for a good couch. Better couches use foam and fabric."
- Izkata 4y ago> while ignoring that all of the problems with the registry spawn from the choice to have it be a filesystem in a file. The whole point of that paragraph is that the problems it has as a filesystem do not spawn from the choice of having a filesystem in a file.
- swinglock 4y agoMuch like SQLite or what have you. What specifically is problematic about that, or what would be better?