Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5933887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:02:12+00:00 2026-05-22T15:02:12+00:00

Roughly speaking, what’s the performance of .net code that reads/deletes keys from the Windows

  • 0

Roughly speaking, what’s the performance of .net code that reads/deletes keys from the Windows registry? Is it akin to file i/o? faster? closer to memory i/o? slower? closer to network i/o? (i can’t imagine…just stated for completeness =)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:02:13+00:00Added an answer on May 22, 2026 at 3:02 pm

    You can’t even start to compare network i/o with local file i/o / registry access because there are so many more factors at work.

    You could in theory devise some sort of test to compare file reads with registry reads, but I don’t think it will be of any benefit. This test could still be flawed because it may depend on which keys you are reading from and other apps that may also be reading the registry in the background.

    If you need to access the registry then the time it takes is largely irrelevant because you have no option but to do it anyway – likewise with file i/o.

    EDIT:

    Quick Test gives the following results:

    • 100,000 registry reads takes 1.81 – 1.89 s

    • 100,000 reads of a 9 byte file takes 19.80 – 20.10 s (so registry is much (~10x) faster:)

      Dim sw As New Stopwatch
      
      Dim subkey As RegistryKey
      Dim value As String
      Dim keyValue As String
      
      sw.Reset()
      sw.Start()
      For i As Integer = 1 To 100000
          keyValue = "SOFTWARE\Codejock Software\Xtreme SuitePro ActiveX v15.0.2"
          subkey = Registry.LocalMachine.OpenSubKey(keyValue, False)
          value = subkey.GetValue("Installation Directory")
      Next
      sw.Stop()
      Debug.WriteLine("Registry Read:" + sw.ElapsedMilliseconds.ToString)
      
      Dim fileContents As String
      
      sw.Reset()
      sw.Start()
      For i As Integer = 1 To 100000
          fileContents = My.Computer.FileSystem.ReadAllText("C:\scratch\Text.txt")
      Next
      sw.Stop()
      Debug.WriteLine("File Read:" + sw.ElapsedMilliseconds.ToString)
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file containing, roughly speaking, the state of the application. I want
I have a 100Mb file with roughly 10million lines that I need to parse
I'm toying with an application that is, roughly speaking, a sort of modeler application
I have html code that looks roughly like this: <div id=id1> <div id=id2> <p>some
Unit testing is, roughly speaking, testing bits of your code in isolation with test
I understand that, roughly speaking, Trello uses Redis for a transient data store. Is
Linux 2.6.39 introduced O_PATH open mode, which (roughly speaking) doesn't really open the file
I have elements structured roughly like this: http://jsfiddle.net/zyySd/ Is there any way to achieve
I have roughly 12 computers that each have the same script on them. This
This is roughly the code I'm working with now: List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.