While conducting an autopsy on a windows install, I loaded a SOFTWARE hive which turned out to have about 540,000 deleted keys (found the cause of death...). It took many minutes to load, and a quick consult with ETW told me it was all List.Contains operations.
While conducting an autopsy on a windows install, I loaded a SOFTWARE hive which turned out to have about 540,000 deleted keys (found the cause of death...). It took many minutes to load, and a quick consult with ETW told me it was all List.Contains operations.
https://github.com/EricZimmerman/Registry/blob/cbb643405231db2c15f0053008b5e9d998491909/Registry/RegistryHive.cs#L1194
changed to
new HashSet<long>()
gets the job done in an appropriately expedient manner.