Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate+heavy OCS call for indicators #7593

Closed
diocas opened this issue Sep 7, 2022 · 1 comment · Fixed by #7580
Closed

Duplicate+heavy OCS call for indicators #7593

diocas opened this issue Sep 7, 2022 · 1 comment · Fixed by #7580
Labels
Early-Adopter:CERN Type:Bug Something isn't working

Comments

@diocas
Copy link
Contributor

diocas commented Sep 7, 2022

To get the indicators, web is doing 2 OCS requests to get the shares for the current and parent folders.
The problem is that the last request is done without the path filter query param, which means all the shares are returned. This is expensive and returns lots of information we already have.

Imagining we have created the tree /New folder/New folder, the last request will include it:

GET https://ocis.ocis-web.latest.owncloud.works/ocs/v1.php/apps/files_sharing/api/v1/shares?reshares=true

...
      <element>
        ...
         <path>/New folder/New folder</path>
         <item_type>folder</item_type>
        ...
      </element>
...

but this is redundant because we already did

GET https://ocis.ocis-web.latest.owncloud.works/ocs/v1.php/apps/files_sharing/api/v1/shares?path=%2FNew%20folder%2FNew%20folder&reshares=true

I suppose what is wrong here is the ocs request without filter because that's expensive and the individual requests for specific folders might be less so (are they?).

Also, if we already rely on the webdav response for the current folder, I assume we only need to query ocs for the parent folders, but I see a request for the current one as well.

(ps: this issue was reported via chat before, just added it here for better tracking)

@diocas diocas added Type:Bug Something isn't working Early-Adopter:CERN labels Sep 7, 2022
@JammingBen
Copy link
Collaborator

JammingBen commented Sep 7, 2022

This should/will be fixed via #7580

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Early-Adopter:CERN Type:Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants