Univention Bugzilla – Bug 40360
Performance optimization for App Center: Checksum cache
Last modified: 2017-07-26 16:45:35 CEST
The 3 most expensive things during "univention-appcenter update" are the SSL handshake, decoding bytes to unicode and the MD5 calculations: ncalls tottime percall cumtime percall filename:lineno(function) 4 0.191 0.048 0.191 0.048 {built-in method do_handshake} 151610 0.155 0.000 0.155 0.000 {_codecs.utf_8_decode} 1 0.151 0.151 0.456 0.456 update.py:306(_read_index_json) The calculation of the MD5 hash is done very often in 'univention-app update'. 528 0.011 0.000 0.053 0.000 utils.py:208(get_md5_from_file) Maybe it also helps to re.compile the regular expressions which are used often (and it doesn't help to compile them every time as done in appcenter.utils.call_process()). E.g. the ones which are passed directly at the App class as AppAttribute. But this shouldn't be a big performance leak: ncalls tottime percall cumtime percall filename:lineno(function) 138/137 0.001 0.000 0.055 0.000 sre_parse.py:663(parse)
Maybe it becomes irrelevant if we choose to extract the whole all.tar.gz. Maybe it becomes even more important. Not sure yet.
(In reply to Dirk Wiesenthal from comment #1) > Maybe it becomes irrelevant if we choose to extract the whole all.tar.gz. > Maybe it becomes even more important. Not sure yet. Becomes irrelevant...