Univention Bugzilla – Bug 31257
"ucr get" vs "ucr shell" performance
Last modified: 2021-12-15 07:20:08 CET
"ucr shell var" needs a lot of more time than "ucr get var". It seems that "ucr shell var" builds all variables in the first step and filters the requested variable in a second step: root@master501:~# time ucr get ldap/hostdn cn=master501,cn=dc,cn=computers,dc=deadlock50,dc=local real 0m0.053s user 0m0.032s sys 0m0.012s root@master501:~# time ucr shell ldap/hostdn ldap_hostdn=cn=master501,cn=dc,cn=computers,dc=deadlock50,dc=local real 0m0.265s user 0m0.240s sys 0m0.016s root@master501:~# time ucr shell apache2_allowoverride='' [...] real 0m0.294s user 0m0.236s sys 0m0.024s root@master501:~# See also Bug #31256
Created attachment 5237 [details] Regular expression optimization The problem is that "ucr search" expects a *list of regular expressions*, while "ucr get" expects a *single variable name for an exact match*. # time ucr shell $(ucr search --brief | cut -d: -f1) >/dev/null real 0m0.733s # time ucr shell >/dev/null real 0m0.218s # time ucr dump >/dev/null real 0m0.081s Instead of compiling all regular expressions for themselves, the attached patch combines all arguments to one giant regexp and used that: # time ucr shell $(ucr search --brief | cut -d: -f1) >/dev/null real 0m0.592s # time ucr shell >/dev/null real 0m0.221s This is only slightly better than the original implementation.
*** Bug 33521 has been marked as a duplicate of this bug. ***
This issue has been filed against UCS 4.2. UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.
univention-config-registry (15.0.0-6) Bug #31257: improove UCR shell performance changelog-5.0-0.xml Changelog Bug #31257
OK: c943a56003e83fdab0173ff77698b1c518786498 FIXED: 099c91e7edc3e6cea266cf1333a1c26ae7482d71 OK: ucr search OK: ucr search a b c d e f g h i j k l m n o p q r s t u v w x y z '' FIXED: b8de8f71ba3a82c4a959317edde351056196d936
UCS 5.0 has been released: https://docs.software-univention.de/release-notes-5.0-0-en.html https://docs.software-univention.de/release-notes-5.0-0-de.html If this error occurs again, please use "Clone This Bug".