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

Improve getting recent files performance #33788

Merged
merged 1 commit into from
Sep 8, 2022
Merged

Improve getting recent files performance #33788

merged 1 commit into from
Sep 8, 2022

Conversation

CarlSchwan
Copy link
Member

Only look for files modified in the last 2 weeks

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

Reasonable trade-off

After all it says recent and not most recent 😉

Only do so when asking for less than 100 files and having an offset
equal to 0.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@AndyScherzinger
Copy link
Member

@CarlSchwan so what are the changes besides only looking at files changed in the last two weeks, would 'changed' also include 'created' and is it now limited to the users storage or just the 2 weeks time frame?

Just to check with @karlitschek and @jancborchardt if it is feasible to limit recent files search in this way that it at least works again on larger instances and enables the recommendation app to work again plus in both scenarios not nuke large installations.

@karlitschek
Copy link
Member

Sorry. I'm too stupid :-) What does this mean exactly? Is this the recent files view in the files app only? Or for other places too?

@max-nextcloud
Copy link
Contributor

@CarlSchwan so what are the changes besides only looking at files changed in the last two weeks, would 'changed' also include 'created' and is it now limited to the users storage or just the 2 weeks time frame?

The only change is the 2 weeks time frame. Group folders are included and changed should include created - haven't tested that though.

Just to check with @karlitschek and @jancborchardt if it is feasible to limit recent files search in this way that it at least works again on larger instances and enables the recommendation app to work again plus in both scenarios not nuke large installations.

This will hopefully reduce the database load. On one instance I investigated the main load was sorting the results by timestamp to then pick the 7 most recent. The list of files to sort should be much smaller if only the ones changed in the last two weeks are included... whether it's enough to enable the app again on large instances remains to be seen.

Sorry. I'm too stupid :-) What does this mean exactly? Is this the recent files view in the files app only? Or for other places too?

Basically all places that query for recent files. Definitely in the recommendations app.

@CarlSchwan
Copy link
Member Author

So should I merge it? :p

@AndyScherzinger
Copy link
Member

So should I merge it? :p

Yes, fine by Frank and me behavior-wise

@karlitschek
Copy link
Member

I think it's cool! I like it!!

@CarlSchwan CarlSchwan merged commit eac54c4 into master Sep 8, 2022
@CarlSchwan CarlSchwan deleted the improve-recent branch September 8, 2022 14:19
@CarlSchwan
Copy link
Member Author

/backport to stable24

@CarlSchwan
Copy link
Member Author

/backport to stable23

@Jerome-Herbinet
Copy link
Member

Will this also speed up getting recent files in the Android app ?

@AndyScherzinger
Copy link
Member

Will this also speed up getting recent files in the Android app ?

I am not aware of the app having a recent files view.

@Jerome-Herbinet
Copy link
Member

Will this also speed up getting recent files in the Android app ?

I am not aware of the app having a recent files view.

Oh, sorry, I've just seen that I've confused it with the favourites (which, in the Android application, are quite long to display). Forget about my message.

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.

8 participants