top_matches slows down with every match and takes a lot of time with big pillars (slow deepcopy) #61950
Labels
Bug
broken, incorrect, or confusing behavior
Core
relates to code central or existential to Salt
Performance
Pillar
severity-medium
3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description
On top parsing
top_matches
getconfirm_top
matcher fromLazyLoader
which in turn lazyloads other matchers, creatingLazyLoader
on every match call.->
top_matches
salt/salt/state.py
Line 3955 in 1568067
->
confirm_top
salt/salt/state.py
Line 3974 in 1568067
->
matchers
salt/salt/matchers/confirm_top.py
Line 24 in 1568067
->
create new LazyLoader
salt/salt/loader/__init__.py
Line 392 in 1568067
->
LazyLoader calls super slow deepcopy(opts)
salt/salt/loader/lazy.py
Line 247 in 1568067
In my setup top_matches takes 10+ seconds for some minions. Every deepcopy(opts) in LazyLoader takes about 100ms when all pillars in opts.
Expected behavior
Parse top.sls in milliseconds, instead of tens of seconds.
Run examples
salt-call pillar.items --out yaml
is about 2MB in sizeadded some logging
time salt-call state.apply -l warning --state-output=changes --state-verbose=False --master localhost
Versions Report
salt --versions-report
The text was updated successfully, but these errors were encountered: