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

Avoid an expensive filter on each request #1

Open
chintal opened this issue Apr 20, 2023 · 0 comments
Open

Avoid an expensive filter on each request #1

chintal opened this issue Apr 20, 2023 · 0 comments

Comments

@chintal
Copy link
Member

chintal commented Apr 20, 2023

https://github.com/tendril-framework/tendril-filestore/blob/main/src/tendril/filestore/actual.py#L155

Using the list() endpoint for getting filenames and filtering on it produces nothing of value beyond making sure the files exist. However, this filter is going to grow rapidly and making this check on such a generalized query is a terrible idea.

Remove the list() usage here. Even if session management and exception handling aren't robust enough to prevent a desync, have a separate maintenance process which verifies integrity in the background.

Before actually making the change, make sure the 'page' argument isn't actually doing something useful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant