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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview image caching #1885

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Rukongai
Copy link
Contributor

Checklist

馃毃 Please review the guidelines for contributing to this repository. 馃毃

  • Make sure you are making a pull request against our main branch (left side)
  • Check that that your branch is up to date with our main.
  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your main!
  • Check that the tests and code linter both pass.
  • If you're a new contributor, please sign our contributor license agreement.

Warnings

  • This PR will change existing database contents.
  • This PR introduces a breaking change to existing installations.

Summary

Creates resized images to facilitate faster loading

Description of changes

This creates a resized image of images to display on navigational pages (models, library, model files, etc)
Images are cached to tmp folder, I don't know if there is a better way of going about this but the change was pretty impactful for me. Maybe worth generating previews on discovery and attaching them to corresponding file in db?

Here are some before and after load times, loading a page with 24 items displayed

Test# Page 1 Before Page 1 After Page 2 Before Page 2 After
1 5.09s .863s 12.43s .794s
2 8.94s 1.25s 9.79s .775s
3 3.74s .762s 8.67s 1s
4 5.73s .771s 8.05s 1.12s

Let me know if you want me to pr this in earnest

@Rukongai
Copy link
Contributor Author

BTW I have a docker image built with my dev branch which should encapsulate all the changes I have PRs open for at rukongai/manyfold:dev if that is at all convenient.

@Floppy
Copy link
Collaborator

Floppy commented Feb 19, 2024

Very nice, I like it! Some of those images can be really heavy, so this is a great idea.

Apologies I'm not getting through merging your PRs very quickly - my wife broke her arm, so I'm hardly getting any work time at the moment! Bear with me for a bit, I'll get there 馃槃

@Rukongai
Copy link
Contributor Author

There is literally no rush. I was recently laid off - so I'm just keeping myself distracted. Take care of your wife and life!

@Rukongai
Copy link
Contributor Author

Sorry got sucked into a new project. I鈥檓 about to wrap it up and I鈥檒l come back and clean all this up

@Floppy Floppy added improvement Refactors and behind-the-scenes improvements performance Speedy go fast labels Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Refactors and behind-the-scenes improvements performance Speedy go fast
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants