Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

fetch shares using json instead of XML #1147

@butonic

Description

@butonic

We should use JSON to fetch shares instead of XML. With hundreds of shares (in this case 500) the savings become noticeable:

vscode ➜ ~/repositories/reva (prefer-return-minimal ✗) $ curl -k https://cloud.ocis.test/ocs/v1.php/apps/files_sharing/api/v1/shares\?include_tags\=false\&state\=all\&shared_with_me\=true -u marie:radioactivity | wc -c
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  719k    0  719k    0     0  65986      0 --:--:--  0:00:11 --:--:--  183k
736536
vscode ➜ ~/repositories/reva (prefer-return-minimal ✗) $ curl -k https://cloud.ocis.test/ocs/v1.php/apps/files_sharing/api/v1/shares\?include_tags\=false\&state\=all\&shared_with_me\=true\&format\=json -u marie:radioactivity | wc -c 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  554k    0  554k    0     0  54360      0 --:--:--  0:00:10 --:--:--  132k
567465

roughly 1/3 the size...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions