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

Store filesize in database #1056

Open
madprime opened this issue May 28, 2019 · 0 comments
Open

Store filesize in database #1056

madprime opened this issue May 28, 2019 · 0 comments
Labels
affects-users Affects site users (members and/or visitors) enhancement

Comments

@madprime
Copy link
Member

Whenever the property size is called on files, we're currently doing a call to S3 to retrieve the file's actual size -- which can slow things down a lot, e.g. when trying to list a bunch of files along with their sizes.

Suggested improvement: add a field size to store this value (a permanent cache of the value from S3). A call to S3 can be done when there's good cause to double-check the value.

Note: be wary of any potential places in code where the size call was been used as a proxy for checking the presence of a file on S3!

@madprime madprime added enhancement affects-users Affects site users (members and/or visitors) labels May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-users Affects site users (members and/or visitors) enhancement
Projects
None yet
Development

No branches or pull requests

1 participant