Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFPtje <none@none>2015-11-05 22:02:54 +0300
committerFPtje <none@none>2015-11-05 22:02:54 +0300
commitc91d9bb5f4be3bdbc8dd112fd8f68ff4b99d70e4 (patch)
tree567fde79fb222486540d78f4010b73e98a61d13e
parent67c98b6bf49e623a6ceaa6f13c0c2dafca070cb1 (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.
-rw-r--r--windirstat/dirstatdoc.cpp2
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;