Closed tiborsimko closed 3 years ago
After investigating more, I ran the profiler in my system:
Without Verbose
1368638 function calls (1296534 primitive calls) in 3.747 seconds
With Verbose
1369600 function calls (1297496 primitive calls) in 19.312 seconds
After removing the progress
from the response, there's a significant change in the response time.
1367216 function calls (1295112 primitive calls) in 1.329 seconds
1368123 function calls (1296019 primitive calls) in 1.515 seconds
The reana-client list
and reana-client list -v
output is same as expected.
We shall need new CLI options to include/exclude progress, to include/exclude disk space... Currently we only have -v
for "verbose" which masks them all.
This could be addressed together with the filtering issue so that users would be able to write:
$ reana-client list --filter name=bsm --include-progress --include-workspace-size
in the future.
... or, --filter name=bsm --format NAME,RUN_NUMBER,STARTED,PROGRESS,SIZE
to use the filtering options to choose which columns to fetch from the server and to print. For example, if there is no PROGRESS asked for, then this won't be passed over to REST API endpoint, and the server-side work won't have to fetch big logs from the DB and calculate progress.
For the issue at hand, we can not be sending progress (unless asked), and we can add new parameters to the REST API endpoint that will fetch only what is necessary. So the work should be done for master
.
The speed up of the
list
command was improved as part of https://github.com/reanahub/reana-client/issues/367. However, more improvements are needed.E.g. for one client having about 101 workflows, the
list
may take 40-50 seconds, which is too much:We should debug what is being done on the server side, what is being sent to the client, and minimise passing of any unnecessary information down to the client so that
reana-client list
would be very fast.Ideally one SQL query should be done on the server side, detecting and passing only that information that is being displayed:
i.e. only information about times and statuses, which should be very fast and should not take dozens of seconds.
P.S. The command
list
took 44 secs to get response, the commandlist -v
took 56 seconds.