Univention Bugzilla – Bug 38345
App Center startup performance
Last modified: 2015-08-10 11:04:47 CEST
Currently, it took between 5 and 9 seconds to open the App Center. I think that is too long.
I also experienced that long loading time during demonstration. I used demo.univention.com.
Created attachment 6943 [details] management-console-module-appcenter.log Maybe we can also adapt the PackageManager __init__ to get a better performance
Created attachment 6944 [details] WIP patch: ucr.load and getMachineConnection in app_center.py to_dict(): ucr.load() and ldap_object = self.get_ldap_object() --> admin_uldap.getMachineConnection() Both methods are slowing down the performance, so we added two helper functions and global variables to check if we need to a) reload ucr b) establish a new ldap connection pls note wip for this patch
@Alex: Cool :) ! (BTW, diff -Nu yields a more common diff format.) @Florian: The LDAP timeout should be caught in uldap directly, is that correct?
(In reply to Alexander Kläser from comment #4) > @Alex: Cool :) ! (BTW, diff -Nu yields a more common diff format.) > > @Florian: The LDAP timeout should be caught in uldap directly, is that > correct? No, the methods will raise univention.admin.uexceptions.{ldapTimeout,ldapError} when a timeout occurs. I think we have to implement the same workarounds as in UDM, too.
r61838 r61840 We improved the performance by using decorators for loading ucr (inside to_dict) and requesting a ldap connection/position. As discussed with Florian later on we can remove the decorators.py file and use a more generic solution. We also register a umcCommand (appcenter/ping) on the umc startup for another 700milliseconds. Package: univention-management-console-module-appcenter Version: 4.1.20-33.373.201507071447 Branch: ucs_4.0-0 Scope: errata4.0-2 r61843 yaml file
r61847 univention-management-console-module-appcenter (4.1.20-34) * Bug #38345: Adapted decorators Package: univention-management-console-module-appcenter Version: 4.1.20-34.374.201507071530 Branch: ucs_4.0-0 Scope: errata4.0-2 r61849 yaml file
*** Bug 38860 has been marked as a duplicate of this bug. ***
Please add a preinst like management/univention-directory-manager-modules/debian/python-univention-directory-manager.preinst to prevent problems during upgrade. Please fix Bug #38860.
Please also alter util.py. I had my fingers in the code, so I better don't to the QA?!
r62036 Added error handling for 38860 Added a preinst Adapted util.py Successful build Package: univention-management-console-module-appcenter Version: 4.1.20-35.376.201507101257 Branch: ucs_4.0-0 Scope: errata4.0-2 r62037 yaml file
Please adjust the following thing in util.py: IOError is not raised by the decorators/functions instead lo is None in that case.
(In reply to Florian Best from comment #12) > Please adjust the following thing in util.py: > IOError is not raised by the decorators/functions instead lo is None in that > case. Also there is univention.uldap not univention.admin.uldap used. You have to add 'lo = lo.lo'.
*** Bug 38914 has been marked as a duplicate of this bug. ***
(In reply to Florian Best from comment #12) > Please adjust the following thing in util.py: > IOError is not raised by the decorators/functions instead lo is None in that > case. r62112 Adjusted the requested parts in util.py Also removed needless import from appcenter, decorator and util.py Tested it localy on my vm - should work fine. r62113 Adapted changelog Successful build Package: univention-management-console-module-appcenter Version: 4.1.20-37.381.201507150840 Branch: ucs_4.0-0 Scope: errata4.0-2 r62114 yaml file
r62115 Merged the changes into 4.1
r62119 As discussed a added error handling if lo is None Package: univention-management-console-module-appcenter Version: 4.1.20-38.382.201507151214 Branch: ucs_4.0-0 Scope: errata4.0-2 r62121 yaml file r62120 merged changes to 4.1-0
(In reply to Florian Best from comment #9) > Please add a preinst like > management/univention-directory-manager-modules/debian/python-univention- > directory-manager.preinst to prevent problems during upgrade. > > Please fix Bug #38860. The preinst is for the wrong package. It has to be for univention-management-console-module-appcenter not univention-management-console-module-apps.
(In reply to Florian Best from comment #18) > (In reply to Florian Best from comment #9) > > Please add a preinst like > > management/univention-directory-manager-modules/debian/python-univention- > > directory-manager.preinst to prevent problems during upgrade. > > > > Please fix Bug #38860. > > The preinst is for the wrong package. It has to be for > univention-management-console-module-appcenter not > univention-management-console-module-apps. As requested I added a preinst file for module-appcenter and moved the code from r62036 Also added dpkg --compare-versions "$2" 4.1.20-41 r62533 And removed two typos r62534 Successful build Package: univention-management-console-module-appcenter Version: 4.1.20-43.388.201507301424 Branch: ucs_4.0-0 Scope: errata4.0-2 yaml file r62535
OK: 3.8 seconds to open the appcenter now. It could be further improved (to 2 seconds) if we make a appcenter/query after UMC login. YAML: OK OK: Merge to UCS 4.1 (the preinst is not required in 4.1)
<http://errata.univention.de/ucs/4.0/267.html>