Bug 43662 - App Center update performance
App Center update performance
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Dirk Wiesenthal
Stefan Gohmann
: interim-3
Depends on:
Blocks: 43496 43847 45080
  Show dependency treegraph
 
Reported: 2017-02-27 21:04 CET by Stefan Gohmann
Modified: 2017-07-26 16:52 CEST (History)
0 users

See Also:
What kind of report is it?: Development Internal
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 Stefan Gohmann univentionstaff 2017-02-27 21:04:51 CET
I've switched to our test app center. It took more than 2 minutes to update the internal cache:

 12627 actions.update.progress          17-02-27 20:58:47 [   DEBUG]: 0
[...]
 12627 actions.update                   17-02-27 21:01:20 [   DEBUG]: Extracting wildfly_20170222160423.meta
 12627 actions.update                   17-02-27 21:01:20 [   DEBUG]: Extracting wildfly_20170222160423.inst
 12627 actions.update                   17-02-27 21:01:20 [   DEBUG]: Extracting wildfly_20170222160423.ini
 12627 actions.update                   17-02-27 21:01:20 [   DEBUG]: Extracting wildfly_20170222160423.README_EN
 12627 actions.update                   17-02-27 21:01:20 [   DEBUG]: Extracting wildfly_20170222160423.logo
 12627 cache                            17-02-27 21:01:20 [   DEBUG]: Cache outdated. Need to rebuild
 12627 cache                            17-02-27 21:01:21 [   DEBUG]: Saved 21 apps into cache
 12627 cache                            17-02-27 21:01:21 [   DEBUG]: Cache outdated. Need to rebuild
 12627 cache                            17-02-27 21:01:23 [   DEBUG]: Saved 335 apps into cache
 12627 actions.update                   17-02-27 21:01:23 [   DEBUG]: Updating app files...
 12627 actions.update                   17-02-27 21:01:23 [   DEBUG]: Updating app icon files in UMC directory...
 12627 actions.update                   17-02-27 21:01:23 [    INFO]: File: /usr/share/univention-management-console/modules/apps.xml
 12627 actions.update                   17-02-27 21:01:23 [    INFO]: 
 12627 actions.update                   17-02-27 21:01:24 [    INFO]: File: /usr/share/univention-management-console/i18n/de/apps.mo
 12627 actions.update                   17-02-27 21:01:24 [    INFO]: 
 12627 actions.update                   17-02-27 21:01:25 [   DEBUG]: copying /var/cache/univention-appcenter/appcenter-test.software-univention.de/4.2/adconnector.logo -> /usr/share/univention-management-console-frontend/js/dijit/themes/umc/icons/scalable/apps-adconnector.svg
Comment 1 Stefan Gohmann univentionstaff 2017-03-09 17:47:05 CET
I think we should simply sign the tar file and extract it in one step.
Comment 2 Dirk Wiesenthal univentionstaff 2017-03-13 12:15:35 CET
(In reply to Stefan Gohmann from comment #1)
> I think we should simply sign the tar file and extract it in one step.

This sounds like a good idea. Extracting all.tar.gz "unsupervised" is quite fast.

time univention-app update
real	0m7.040s
user	0m4.120s
sys	0m0.356s

rm -r /var/cache/univention-appcenter/appcenter.software-univention.de/
time univention-app update
real	0m14.282s
user	0m11.676s
sys	0m1.564s

Is it enough? I now added all.tar.gz files for the Test App Center to the univention-appcenter-dev package. This eases the pain of switching. Super easy to do.

Downside is that the archive will soon be outdated. So this helps only if we update the archives regularly (say, 4.2-0, 4.2-1, ...)

REOPEN if you think that we should sign and extract the archives right away with errata0. Downloaded archives (after a month or so) should be slow again. But keep in mind that in the current implementation, you only have to extract the "diff".
Comment 3 Stefan Gohmann univentionstaff 2017-03-14 16:37:11 CET
It is OK for now, I'll create a new bug that we will fix it more generally.

Please add a changelog entry.
Comment 4 Stefan Gohmann univentionstaff 2017-03-14 16:39:25 CET
(In reply to Stefan Gohmann from comment #3)
> It is OK for now, I'll create a new bug that we will fix it more generally.

Bug #43847
Comment 6 Dirk Wiesenthal univentionstaff 2017-03-17 02:22:09 CET
Changelog entry added, threshold adjusted.
Comment 7 Stefan Gohmann univentionstaff 2017-03-17 07:26:35 CET
(In reply to Dirk Wiesenthal from comment #6)
> Changelog entry added, threshold adjusted.

I didn't find a changelog commit. Maybe, it is still in your working copy?
Comment 8 Dirk Wiesenthal univentionstaff 2017-03-20 10:39:58 CET
Changelog added.

For tests regarding the update performance:
Did you use
  ucr set repository/app_center/server=
or
  univention-app dev-use-test-appcenter

Because the tar.gz for the Test App Center comes with the package
  univention-appcenter-dev

Without this package, the Test App Center cache cannot be "prefilled" with an archive.
Comment 9 Dirk Wiesenthal univentionstaff 2017-03-20 17:08:34 CET
I have fixed the detection of file changes one more time in
  univention-appcenter (6.0.3-16)
Comment 10 Stefan Gohmann univentionstaff 2017-03-20 20:30:34 CET
No, I didn't use univention-appcenter-dev. Anyway, the real fix will be implemented with Bug #43847.
Comment 11 Stefan Gohmann univentionstaff 2017-04-04 18:29:18 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".