mirror of https://github.com/Icinga/icinga2.git
Merge pull request #10008 from Icinga/Al2Klimov-patch-12
Don't unnecessarily shuffle items before config validation
This commit is contained in:
commit
097ba00a9c
|
@ -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.";
|
||||
|
|
Loading…
Reference in New Issue