Univention Bugzilla – Bug 52253
UMC login would perform better with xml.etree.cElementTree instread of xml.etree.ElementTree
Last modified: 2020-11-04 14:49:21 CET
UMC/SAML-Login performance tests with 82_saml/90_concurrent_saml_login_multiprocessing showed that UMC login would perform better with xml.etree.cElementTree instread of xml.etree.ElementTree. With the C implementation UMC Login performed 29% better. * 90_concurrent_saml_login_multiprocessing against normal UMC: ## 32 cores Mean time per portal login 0.203379382133 Number of logins per second: 4.9169192546 * 90_concurrent_saml_login_multiprocessing against patched UMC: UMC mit xml.etree.cElementTree statt xml.etree.ElementTree ## 32 cores Mean time per portal login 0.157018792152 Number of logins per second: 6.36866445278 The test case was 10 times 50 parallel (multiprocessing) logins.
lxml.etree might be even better but has a different API.
The implementation now uses cElementTree. FYI: Python 3 already uses the C implementation by default. Strongly the merge request for UCS 5.0 is not necessary. The error handling catches "xml.parsers.expat.ExpatError", which is probably okay. It was added in Bug #22460 / git:3fe4bd9c965fdeca586a15ee66c903c7da162dd1 (initial UMC commit in UCS 3). I could only cause ET.ParseError errors. univention-management-console.yaml a8b3ec6be8e4 | YAML Bug #52253 univention-management-console (11.0.5-5) 0a36eb06bece | Bug #52253: prefer cElementTree over ElementTree for performance reasons UCS 5: merge request: https://git.knut.univention.de/univention/ucs/-/merge_requests/21
Code: OK Performance increase: OK YAML: OK
<https://errata.software-univention.de/#/?erratum=4.4x794>