diff options
author | FPtje <none@none> | 2015-11-05 22:02:54 +0300 |
---|---|---|
committer | FPtje <none@none> | 2015-11-05 22:02:54 +0300 |
commit | c91d9bb5f4be3bdbc8dd112fd8f68ff4b99d70e4 (patch) | |
tree | 567fde79fb222486540d78f4010b73e98a61d13e /windirstat | |
parent | 67c98b6bf49e623a6ceaa6f13c0c2dafca070cb1 (diff) |
Initialise the hash map containing extension data with 2048 entries
2048 is a decent estimation for the amount of unique extensions one can have on
one's hard drive. On a hard drive scan, this gave a decent performance boost. On
my machine I got a difference from 280ms to 220ms on average.
Diffstat (limited to 'windirstat')
-rw-r--r-- | windirstat/dirstatdoc.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/windirstat/dirstatdoc.cpp b/windirstat/dirstatdoc.cpp index 61e66c2..dee3ede 100644 --- a/windirstat/dirstatdoc.cpp +++ b/windirstat/dirstatdoc.cpp @@ -749,6 +749,8 @@ void CDirstatDoc::RebuildExtensionData() CWaitCursor wc; m_extensionData.RemoveAll(); + // 2048 is a rough estimate for amount of different extensions + m_extensionData.InitHashTable(2048); m_rootItem->RecurseCollectExtensionData(&m_extensionData); CStringArray sortedExtensions; |