Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsemanage: improve performance of semanage store rebuild
Commit 9d107ab ("libsemanage: Set new restorecon handle before doing restorecon ") added reopeniong selabel handle every time semanage_setfiles() is called. It means that during `semodule -B`, `selabel_close()` and `selabel_open()` could be called more than 1800x what could have a significant performance impact. It should be enough to reopen selabel handle just after semanage commit when changes are applied. Before 9d107ab: semodule -B 5.84s user 0.52s system 96% cpu 6.585 total After 9d107ab: semodule -B 11.15s user 0.64s system 98% cpu 11.952 total With this patch: semodule -B 5.51s user 0.41s system 98% cpu 6.014 total Signed-off-by: Petr Lautrbach <[email protected]> Acked-by: Jason Zaman <[email protected]>
- Loading branch information