Bug 40360 - Performance optimization for App Center: Checksum cache
Performance optimization for App Center: Checksum cache
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P2 normal (vote)
: ---
Assigned To: App Center maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-04 23:55 CET by Dirk Wiesenthal
Modified: 2017-07-26 16:45 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2016-01-04 23:55:25 CET
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)
Comment 1 Dirk Wiesenthal univentionstaff 2017-04-05 14:38:20 CEST
Maybe it becomes irrelevant if we choose to extract the whole all.tar.gz. Maybe it becomes even more important. Not sure yet.
Comment 2 Dirk Wiesenthal univentionstaff 2017-07-26 16:45:35 CEST
(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...