Merge pull request #10008 from Icinga/Al2Klimov-patch-12

Don't unnecessarily shuffle items before config validation
This commit is contained in:
Julian Brost 2024-03-07 16:44:38 +01:00 committed by GitHub
commit 097ba00a9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 6 deletions

View File

@ -439,12 +439,6 @@ bool ConfigItem::CommitNewItems(const ActivationContext::Ptr& context, WorkQueue
if (!total)
return true;
// Shuffle all items to evenly distribute them over the threads of the workqueue. This increases perfomance
// noticably in environments with lots of objects and available threads.
for (auto& kv : itemsByType) {
std::shuffle(std::begin(kv.second), std::end(kv.second), std::default_random_engine{});
}
#ifdef I2_DEBUG
Log(LogDebug, "configitem")
<< "Committing " << total << " new items.";