In doing some performance testing I found that repeated registry hits were resulting in a measurable slow down. Although it was a pretty small part of the overall execution time, it was quantifiable. One thing I did to resolve it (give that reg information doesn't change much, at least for us) was to pull the keys into a hash table that is a static member of a class. This way, the first time the key value is requested, it's pulled from the registry, but subsequent hits to the same key name are pulled from the static hash table. In addition, this hash table is put in the cache and given a timed expiration. This allows for caching of the keys for the lifecycle of the application.
Page 1
Reg read 1
Reg key value read from registry
Key/value put in class scope hash table
Hash table put it cache
Reg read 2
Reg key value read from class scope hash table
Page 2
Reg read 1
Key hash table read from cache
Reg key value read from class scope hash table
Reg read 2
Reg key value read from class scope hash table
Peter
-------------------------
Work smarter, not harder