Bug 52234 - The provider-portal initially loads slowly, but is then responsive
The provider-portal initially loads slowly, but is then responsive
Status: NEW
Product: UCS
Classification: Unclassified
Component: App Center - Self Service
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: App Center maintainers
App Center maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-10-19 17:37 CEST by Max Pohle
Modified: 2021-09-22 09:51 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.057
Enterprise Customer affected?:
School Customer affected?:
ISV affected?: Yes
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021091721000178
Bug group (optional):
Max CVSS v3 score:


Attachments
the json file for the admin-dashboard alone for investigation purposes (998.42 KB, application/json)
2020-10-19 17:52 CEST, Max Pohle
Details
Firefox network analysis (410.72 KB, image/png)
2020-10-19 17:54 CEST, Max Pohle
Details
Firefox network analysis: slowdown01 (112.15 KB, image/png)
2020-10-19 17:56 CEST, Max Pohle
Details
Firefox network analysis: slowdown02 (137.29 KB, image/png)
2020-10-19 17:56 CEST, Max Pohle
Details
Firefox network analysis: slowdown03 (34.23 KB, image/png)
2020-10-19 17:57 CEST, Max Pohle
Details
Firefox network analysis: access denied (102.79 KB, image/png)
2020-10-19 17:57 CEST, Max Pohle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Pohle univentionstaff 2020-10-19 17:37:18 CEST
# Observed behavior

After logging in the provider-portal can take a significant amount of time in order to display the list with all applications. The command line tool is also affected and a single call can take up to several minutes, depending on how many applications are displayed.
Comment 1 Max Pohle univentionstaff 2020-10-19 17:49:51 CEST
# First investigation

A significant amount of time is used to either process, load or parse some JSON-file and it appears to be loaded multiple times. 

> As it turns out it loads exactly as many times as we have sub-versions in UCS, so probably one JSON per UCS-Version.

> The JSON-file contains the list with all apps for a version of UCS with application icons and screenshots, which take up the most significant part of the the file. They are base64 encoded and the conversion may or may not be a performance bottleneck on the server side (to be investigated)


# Possible fixes

> The icons are rarely displayed in the size they are transmitted within the JSON file and could be down-scaled.

> The JSON-file could be cached on the server as well as on the client side. As it changes slowly and mostly in interaction with the user a cache validation strategy should not be too hard to implement.
Comment 2 Max Pohle univentionstaff 2020-10-19 17:52:44 CEST
Created attachment 10528 [details]
the json file for the admin-dashboard alone for investigation purposes
Comment 3 Max Pohle univentionstaff 2020-10-19 17:54:22 CEST
Created attachment 10529 [details]
Firefox network analysis
Comment 4 Max Pohle univentionstaff 2020-10-19 17:56:02 CEST
Created attachment 10530 [details]
Firefox network analysis: slowdown01
Comment 5 Max Pohle univentionstaff 2020-10-19 17:56:42 CEST
Created attachment 10531 [details]
Firefox network analysis: slowdown02
Comment 6 Max Pohle univentionstaff 2020-10-19 17:57:01 CEST
Created attachment 10532 [details]
Firefox network analysis: slowdown03
Comment 7 Max Pohle univentionstaff 2020-10-19 17:57:27 CEST
Created attachment 10533 [details]
Firefox network analysis: access denied
Comment 8 Max Pohle univentionstaff 2020-10-19 18:00:39 CEST
# Possible fix

The screenshot `slowdown03` shows, that the ping command was slow and took about 8 seconds in total. It is not much and possibly not worth it, but it may also unblock other things and can probably easily be fixed, because a firewall is blocking ICMP to provider-portal.software-univention.de at the moment (so that `ping provider-portal.software-univention.de` hangs)
Comment 9 Dirk Wiesenthal univentionstaff 2020-10-20 09:31:07 CEST
(In reply to Max Pohle from comment #8)
> # Possible fix
> 
> The screenshot `slowdown03` shows, that the ping command was slow and took
> about 8 seconds in total. It is not much and possibly not worth it, but it
> may also unblock other things and can probably easily be fixed, because a
> firewall is blocking ICMP to provider-portal.software-univention.de at the
> moment (so that `ping provider-portal.software-univention.de` hangs)

This is no `ping` command. This is a simple command to UMC that shall keep the module open the whole time.

It takes that long because a UMC module does not answer requests in parallel. It takes 8 seconds to finish the previous request (query I suppose). Ping itself is certainly not the bottleneck.
Comment 10 Nico Gulden univentionstaff 2021-09-22 09:47:43 CEST
The problem is still present and improvement is needed. Please also see feedback at Ticket#2021091721000178.
Comment 11 Nico Gulden univentionstaff 2021-09-22 09:49:26 CEST
Here is the feedback from the ticket mentioned in comment 10 as quote:

"""
[...] aber das web-interface ist unglaublich langsam. Falls das ein Kunde benutzen möchte führt das sicher zu einer negativen Benutzer-Erfahrung.

Das Laden der Apps-Übersicht dauert 4-5 Sekunden.
Das Anwählen einer App 2-3 Sekunden.
Ein Klick auf "SAVE" dauert 66-80 Sekunden.

Wenn letzteres am Sync mit dem Test-app-center liegt, sollte der Sync
vielleicht besser im Hintergrund laufen.
"""