Thread: Windows registry helplessly bloats over time?

  1. #1
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158

    Windows registry helplessly bloats over time?

    Someone in a thread in some forum somewhere had said that when keys and values get removed from the Windows registry, they are in fact, still staying there, but the links to then are terminated so a new value or key can use it, and if necessary new links can be created.
    This implies that deleting a value won't help in security because some 'undelete' software can retrieve all the keys that ever got deleted. And, it would mean that the files holding the registry can never shrink in size, but get bigger, even when things are deleted.
    Is this true? And if so, does MS (or someone else) provide a utility to 'defragment' the registry?

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    The registry is a database like any other: if you "delete" something, it gets removed from the indexes but the data itself remains. Resizing the database can cause disk thrashing, so the data usually sits there until something overwrites it.

    Windows however does not have any built-in facility to compact the registry.

  3. #3
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    I am sure I have a friend who runs some kind of registry cleaner at start-up (I thought that was fairly common); just don't ask me what it is.

    Sort of a silly system I guess.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Registry cleaners always seem to hose my Windows install. The biggest problem I find in the registry is all sorts of path information that is no longer valid, yet Windows still tries the path only to find out it doesn't exist anymore. This can slow the boot process a lot.

    Another problem of the registry is not the registry itself but the users. Companies continually put the wrong type of information into the registry even when Microsoft states what should be there and what should be in an external config file.

  5. #5
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    I knew the data stays there even after it's deleted. But with the registry, does the old space ever get re-used? (Like it does in a hard drive after a file has been deleted)
    The post I read made it sound like once a value or key has occupied some space, that room never gets re-claimed by new entries, even after the key or value has been deleted.
    This sounds a little crazy to me, can you verify it?

  6. #6
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Yarin View Post
    This sounds a little crazy to me, can you verify it?
    Deleting something from a db may cause disk flailing concerns, but a database that grows endlessly will become slower and slower to search thru.

    I have heard about exactly this problem (performance droops over time involving the registry) from both lay people and another programmer, so they must have gotten it from somewhere.

    I have also heard it from someone who has been selling and installing PC systems for a living since the 70's, vis, that this is something he routinely recommends (cleaning the registry) and that the performance improvement tends to amaze people who have never done it on a computer they've been using for years.

    Of course I personally don't use windows, so I cannot be positive, but I have a lot of respect for the opinion of the aforementioned sources. I imagine the most significant factor is one mentioned by bubba. Hopefully
    Last edited by MK27; 08-09-2009 at 02:44 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  7. #7
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by Yarin View Post
    I knew the data stays there even after it's deleted. But with the registry, does the old space ever get re-used? (Like it does in a hard drive after a file has been deleted)
    The post I read made it sound like once a value or key has occupied some space, that room never gets re-claimed by new entries, even after the key or value has been deleted.
    This sounds a little crazy to me, can you verify it?
    Yeah thats total BS whoever posted it has no clue.

  8. #8
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Yarin View Post
    I knew the data stays there even after it's deleted. But with the registry, does the old space ever get re-used?
    Certainly it does.

    However with constant key deletions and additions, the registry may become fragmented. So on today systems registry bloat is only a problem if there's a lot of keys that should have been deleted and are not. Usually because uninstalers are mostly crappy pieces of software and programmers don't worry much about the uninstallation feature of their programs. But instead with the installation which needs to have some cool picture, attract the eye, be easy to use and all that mindless uselessness.

    Fragmentation on the other hand is a direct consequence of data being deleted and added to the registry on a constant basis. Both registry file fragmentation and internal data fragmentation (because the registry is essentially an indexed database).

    Fragmentation is irritatingly misunderstood even by so-called registry boosters. Take a look at this advertising text and scroll down until you come to a header titled Fragmentation Windows Registry: Lilutilies. Read what it says. Now read this: Registry Hive Fragmentation Leads to Excessive Size. Can you really trust an application that proposes to defragment your registry when its developers clearly cannot even seem to understand how it happens because they use information from an old Microsoft KB article for an old operating system that even got a patch that already fixed the problem? Don't answer.

    Anyways, apart from registry cleaners that may be useful to clean up your registry from old and unnecessary entries (especially if they point to network resources), fragmentation can happen. And fragmentation does increase the size of your registry and unchecked fragmentation will keep doing it indefinitely. So your friend is half-right. He's wrong however on why the registry size increases in such a way.

    The best tools on the business, that work up to Windows 7, are:

    Internal Defragmentation. NTREGOPT

    Physical Defragmentation: PageDefrag
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  9. #9
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Mario F. View Post
    Usually because uninstalers are mostly crappy pieces of software and programmers don't worry much about the uninstallation feature of their programs. But instead with the installation which needs to have some cool picture, attract the eye, be easy to use and all that mindless uselessness.
    Say it isn't so Mario!

    Take a look at this advertising text and scroll down until you come to a header titled Fragmentation Windows Registry: Lilutilies. Read what it says. Now read this: Registry Hive Fragmentation Leads to Excessive Size. Can you really trust an application that proposes to defragment your registry when its developers clearly cannot even seem to understand how it happens because they use information from an old Microsoft KB article for an old operating system that even got a patch that already fixed the problem? Don't answer.
    Wow, I would hate to have to observe here that this closed source, capitalist model almost seems to discourage computer literacy, because, in the words of an old rock band "it's better for us if you don't understand".
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  10. #10
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Your posts are becoming increasingly hard to decipher. Either you have a point and describe it in a meaningful way, avoiding irony altogether or making it secondary, or you don't really have a point and you refrain from polluting conversations that people are trying to have.

    Reading some of your posts is akin to having two or more people trying to have a conversation and all of a sudden someone else steps in. Could be ok, but this person purpose in life is to listen on the sidelines and think they are smart if their only contribution is making some inside joke only they understand.

    I'm this close to put you on Ignore mode. Just so you know.
    You are trying to be too smart for your own good. Tone it down.
    Last edited by Mario F.; 08-10-2009 at 07:38 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  11. #11
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Good to know.
    Quote Originally Posted by Mario F. View Post
    Internal Defragmentation. NTREGOPT

    Physical Defragmentation: PageDefrag
    Well, that answers what I was leading up too. I see he was wrong about the non-existence of existing defrag software too. (but it could've been an old post)

    Quote Originally Posted by MK27
    Wow, I would hate to have to observe here that this closed source, capitalist model almost seems to discourage computer literacy, because, in the words of an old rock band "it's better for us if you don't understand".
    Not funny. You should stick with Elysia.

  12. #12
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Mario F. View Post
    Your posts are becoming increasingly hard to decipher [...] I'm this close to put you on Ignore mode. Just so you know. You are trying to be too smart for your own good. Tone it down.
    I take that to mean you've really got your head in the mud over that one, because it is as clear as spring water.

    I also don't know why you would respond to my post(s) as if they were personal attacks directed at you. Please do ignore them, if the other alternative is a HISSY FIT :P
    Last edited by MK27; 08-10-2009 at 09:45 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  13. #13
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by MK27 View Post
    I take that to mean you've really got your head in the mud over that one, because it is as clear as spring water
    I'll put it in a way you can understand,

    grab your off-topic political ideologies, your open source religious elistism and your inside jokes linking to music videos, make a nice laced package and stick it up yours.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  14. #14
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Mario F. View Post
    I'll put it in a way you can understand,
    You're a hypocrit. Again, I don't know why you find this upsetting. I made an intelligent observation. I'm sorry it conflicts with your world-view.
    Last edited by MK27; 08-10-2009 at 10:55 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  15. #15
    Registered User
    Join Date
    Jul 2009
    Posts
    50
    Quote Originally Posted by MK27 View Post
    I don't know why you find this upsetting.
    Because you consistently barge into threads to thrash closed source/preach open source with little to no regard for the original topic.

    I made an intelligent observation.
    Questionable. I didn't see much in your comment that was anything other than denouncing closed source software in a very pompous manor.

    You're a hypocrit
    What is this even about?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using the windows registry
    By xixpsychoxix in forum Windows Programming
    Replies: 4
    Last Post: 01-25-2008, 10:37 AM
  2. I apologize. Good bye.
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 05-03-2002, 06:51 PM
  3. Is this really true or it's just science fiction?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 145
    Last Post: 04-09-2002, 06:17 PM
  4. Editing Windows Registry in C?
    By Unregistered in forum C Programming
    Replies: 12
    Last Post: 01-11-2002, 09:42 PM
  5. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 10:12 PM