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

Add getShareTypesInFolder to optimize folder listening #339

Merged
merged 6 commits into from
Nov 1, 2016

Conversation

icewind1991
Copy link
Member

@icewind1991 icewind1991 commented Jul 7, 2016

When getting share info for a folder, instead of looping over the childs and querying each one individually, use a single query to get the share status of all childs.

Gives a very significant improvement when loading large folders in the webui (not sure if the sync client is affected, depends on the properties requested)

TODO

  • also show federated shares
  • tests

cc @rullzer

@icewind1991 icewind1991 added the 2. developing Work in progress label Jul 7, 2016
@icewind1991 icewind1991 added this to the Nextcloud Next milestone Jul 7, 2016
@mention-bot
Copy link

@icewind1991, thanks for your PR! By analyzing the annotation information on this pull request, we identified @PVince81, @rullzer, @schiessle and @DeepDiver1975 to be potential reviewers

@LukasReschke
Copy link
Member

64% (2.6 seconds) faster than before? Nice! 🚀

* @param Node|null $node
* @param bool $reshares Also get the shares where $user is the owner instead of just the shares where $user is the initiator
* @return \OCP\Share\IShare[]
* @since 9.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? This will be 9.1.0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@MorrisJobke
Copy link
Member

@icewind1991 What is the status of this?

@icewind1991
Copy link
Member Author

Needs more work to implement this for the various sharing backends

@icewind1991 icewind1991 force-pushed the share-types-by-folder branch 2 times, most recently from 8b8f3f8 to 19c244e Compare October 26, 2016 13:58
@rullzer rullzer self-assigned this Oct 31, 2016
* Merge share types correctly
* Filter share types
* Order share types

Signed-off-by: Roeland Jago Douma <[email protected]>
Signed-off-by: Roeland Jago Douma <[email protected]>
@rullzer rullzer added 3. to review Waiting for reviews feature: sharing and removed 2. developing Work in progress labels Nov 1, 2016
@rullzer
Copy link
Member

rullzer commented Nov 1, 2016

Ok I think this is ready for review.

CC: @nickvergessen @MorrisJobke @schiessle @LukasReschke

@icewind1991
Copy link
Member Author

👍 for @rullzer's changes

Listing a ~1000 file folder goes from ~3000 queries to 48 😄

Tested by sharing some files and checking if they show up as shared in the file list

@LukasReschke
Copy link
Member

LGTM

@LukasReschke LukasReschke merged commit ef467c3 into master Nov 1, 2016
@LukasReschke LukasReschke deleted the share-types-by-folder branch November 1, 2016 17:44
schiessle added a commit that referenced this pull request Nov 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants