mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-07 21:31:48 +00:00
SETools4 and Python 3 versions of map() and filter() uses iterators to generates query results and these iterators can't be imply re-used. It makes manpage and transitions operations really slow as they do lot of queries. This patch changes it in the way that it caches results in lists for all types, allow rules and transitions first and use cached results to filter them using Python's filter() function. Before: $ time sepolicy manpage -d httpd_t sshd_t init_t real 0m53.486s user 0m53.171s sys 0m0.054s After: $ time sepolicy manpage -d httpd_t sshd_t init_t real 0m10.532s user 0m10.368s sys 0m0.114s Signed-off-by: Petr Lautrbach <plautrba@redhat.com> |
||
---|---|---|
.. | ||
sepolicy | ||
.gitignore | ||
Makefile | ||
sepolgen.8 | ||
sepolicy-bash-completion.sh | ||
sepolicy-booleans.8 | ||
sepolicy-communicate.8 | ||
sepolicy-generate.8 | ||
sepolicy-gui.8 | ||
sepolicy-interface.8 | ||
sepolicy-manpage.8 | ||
sepolicy-network.8 | ||
sepolicy-transition.8 | ||
sepolicy.8 | ||
sepolicy.py | ||
setup.py | ||
test_sepolicy.py |