Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The Windows Registry is one of the biggest targets for criticism from practically everywhere. It's not too hard to find disadvantages for its use, but MS has still kept it since Windows 95.

What is the philosophy behind having a centralized database for all settings instead of lots of readable INI files? What actual advantages does the registry have over folders and sub-folders of settings files?

share|improve this question

closed as not constructive by random Jan 4 '12 at 14:21

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Are there actually people out there who think that a million different INI files in random folders with ill-defined security and multi-app/user read/write race conditions are actually a good idea? Have a fun 1992 y'all! –  GAThrawn May 14 '10 at 22:51
4  
/me raises hand. The linux approach of using /etc and /home for settings (with file locking to avoid race conditions) seems fine to me. The Windows registry is poorly understood and misused by both users and developers. –  RJFalconer Apr 28 '11 at 22:51

3 Answers 3

up vote 5 down vote accepted

Advantages:

  • Applications can use a standard API to access configuration information and don't need to incoporate parsing code to read their configuration. If an application needs to parse a text file to get configuration information, that parser needs to be included as part of the program and is something that can separately have bugs, security issues, etc.

  • The registry supports direct binary data which is stored more efficiently than text-based schemes. This was important around 1992 when hard drive sizes of 200-400MB weren't uncommon.

  • A database-style "log" file is used to record changes to the registry, so if a crash or power outage occurs changes can be rolled back.

  • Separating the interface from he underlying file system makes it possible to change the underlying "backing store" of the registry in the future. Perhaps the designers of Windows orginally eventually envisioned a possibility that part of the registry could reside somewhere other than the hard drive, such as maybe in ROM. or some parts purely in RAM, or some other crazy scheme.

share|improve this answer

All the settings are editable within a single interface, it results in a lot fewer files being created, and (not on Windows) it can be used as an abstraction of other "real" stores.

share|improve this answer
1  
It supports several other data types apart from "text" as well. And not to forget that it's fast. Do a few thousand registry accesses and a few thousand file accesses and watch in awe ;-) –  Joey May 11 '10 at 13:37
    
@joey: That speed comes at the cost of loading and holding in memory (or swap) the configuration info for every program on the system. The advantage is real, but it is not free. –  dmckee Jun 11 '11 at 1:27

The Windows centralized Registry has a number of advantages over legacy INI files. This Wikipedia article explains the advantages.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.