mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-31 01:24:19 +02:00
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)
|
if (!total)
|
||||||
return true;
|
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
|
#ifdef I2_DEBUG
|
||||||
Log(LogDebug, "configitem")
|
Log(LogDebug, "configitem")
|
||||||
<< "Committing " << total << " new items.";
|
<< "Committing " << total << " new items.";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user