Results 1 to 6 of 6
  1. #1
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Storing options in Registry

    I'm an Access developer. A company I do subcontracting work for tends to store a lot of options in the registry, as Access has SaveSetting and GetSetting functions that make this easy. My preference is to store these options in the database itself; perhaps from a pure performance issue this might be slightly slower as it involves updating a database across a network vs. a local registry, but I seem to recall from way-back-when that registry bloating was an issue. My big concern is that they tend to save settings upon exiting a form, whether or not a setting has changed; so there is a lot of registry activity.

    Maybe with current versions of Windows this isn't an issue, but I can't shake the feeling that all this registry activity is not a good idea. Am I wrong here?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    Mark,

    I would tend to agree but it depends on a lot of factors:
    Are the settings User Specific?
    How many settings are there?
    How many users are there? {database bloat if settings are per user}
    Etc.

    Of course this all boils down to being a case by case design decision as I don't think there is a right or wrong answer since there are so many factors to consider. YMMV!

    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    5 Star Lounger
    Join Date
    Dec 2009
    Location
    Delaware, US
    Posts
    1,160
    Thanks
    19
    Thanked 99 Times in 88 Posts
    Without regard to the actual database or the software running it...

    Settings in the database are specific to that database and everyone accessing it will use the same options. The reverse is the case for an ini file or the registry - options vary by user but apply to all the databases that user accesses.

    There are arguments for both and it may be beneficial to have both. But you probably don't want a situation where functionality changes from user to user.

    As far as updating the registry all the time as you describe, I don't consider that a good idea. A user should have to manually save any changes to settings.
    Last edited by gsmith-plm; 2015-10-14 at 09:55.
    Graham Smith
    DataSmith, Delaware
    "For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)

  4. #4
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,571
    Thanks
    5
    Thanked 1,057 Times in 926 Posts
    You can design a repository of options to be user or database or application or system wide regardless of where they are stored. Whether they should be stored in the registry is not necessarily good or bad these days. Over the past couple of decades Microsoft has made significant changes in how the registry is processed. In modern Windows registry bloat is not the concern it used to be. That said, unnecessary registry updates are just not a good idea. In a modern PC it may not make a noticeable difference but I would only design updates to be made when they are required.

    Joe

  5. #5
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,164
    Thanks
    47
    Thanked 976 Times in 906 Posts
    It also depends how portable/crash proof you want the settings to be. Registry is potentially not portable and not crash proof.

    cheers, Paul

  6. #6
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts
    Just so we are clear on the situation, most of the settings being saved to the registry are user-specific. When I save them in the database, they are still user-specific. This does have the advantage in that it doesn't matter where that user logs-in to the database, the settings are always there.

    My concern isn't about performance or "portability". I was specifically concerned about the advisability of using these frequent updates to the registry. I guess old habits are hard to shake, so I think I'm agreeing with JoeP who said "In modern Windows registry bloat is not the concern it used to be. That said, unnecessary registry updates are just not a good idea."
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •