Zhou Zheng Sheng has uploaded a new change for review. Change subject: vdsm-tool: speedup loading seboolsetup.py ......................................................................
vdsm-tool: speedup loading seboolsetup.py On RHEL6 "import seobject" takes a very long time. This patch moves the seobject import statement in seboolsetup.py from module top level to function level. This small modification reduces the total startup time of VDSM, since VDSM moves most of the management utilities into vdsm-tool. Change-Id: I7f961e2661159f671b17f3ab4fb3d5a7cbc3d6b9 Signed-off-by: Zhou Zheng Sheng <[email protected]> --- M lib/vdsm/tool/seboolsetup.py 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/60/16560/1 diff --git a/lib/vdsm/tool/seboolsetup.py b/lib/vdsm/tool/seboolsetup.py index 437da68..1736922 100644 --- a/lib/vdsm/tool/seboolsetup.py +++ b/lib/vdsm/tool/seboolsetup.py @@ -18,7 +18,6 @@ # Refer to the README and COPYING files for full details of the license # -import seobject from vdsm.tool import expose SEBOOL_ENABLED = "on" @@ -36,6 +35,9 @@ def setup_booleans(status): + # loading seobject is slow. Deferring its loading can reduce VDSM starting + # time, because most utilities are and will be moved to vdsm-tool. + import seobject sebool_obj = seobject.booleanRecords() sebool_status = sebool_obj.get_all() -- To view, visit http://gerrit.ovirt.org/16560 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f961e2661159f671b17f3ab4fb3d5a7cbc3d6b9 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
