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

[Feature]: "Reload" button for the gallery #3034

Open
lbeltrame opened this issue Apr 5, 2024 · 3 comments
Open

[Feature]: "Reload" button for the gallery #3034

lbeltrame opened this issue Apr 5, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@lbeltrame
Copy link

Feature description

It's not unusual to use the gallery to check on generations, especially when making use of the agent scheduler. Currently, although not problematic, the workflow to update the gallery to show the newest images works like this, after a generaton:

  1. Click on the folder
  2. Click on the ordering, and wait until all images are reordered

This however is required even after the gallery has been loaded and reordered. The old image gallery (which was far, far worse than the current implementation in dev, mind you), had a sort of reload button which could be used to reload the gallery and show (at least on the first pages) the newly added images.

In short, checking for new images involves reloading the entire gallery and also set the ordering. Hardly anything severe, but a "nice to have" QoL feature. This is set as a request because it would indeed be a new feature.

Version Platform Description

22:08:14-847256 INFO Starting SD.Next
22:08:14-850336 INFO Logger: file="/home/lb/Coding/automatic/sdnext.log" level=INFO size=1376718 mode=append
22:08:14-851437 INFO Python 3.11.8 on Linux
22:08:14-905567 INFO Version: app=sd.next updated=2024-04-04 hash=9d04255b branch=dev url=https://github.com/vladmandic/automatic/tree/dev
22:08:15-366327 INFO Updating main repository
22:08:16-334738 INFO Upgraded to version: 2246510 Fri Apr 5 15:28:50 2024 -0400
22:08:16-344823 INFO Platform: arch=x86_64 cpu=x86_64 system=Linux release=6.8.2-1-default python=3.11.8

@lbeltrame lbeltrame added the enhancement New feature or request label Apr 5, 2024
@vladmandic
Copy link
Owner

valid request just not sure how to implement - issue is that to achieve max performance, gallery loads items async as they are received from server - and during that time, gallery is fully functional - it doesn't need all items to be loaded to show whatever is present. but applying sort only makes sense when they are all loaded.

i could wait until everything is loaded and then sort, but then you'd need to wait for everything - and if you have 10k images in folder, that may not be desired.

if you have a suggestion, let me know.

@vladmandic
Copy link
Owner

i just tried presorting directory list on the server and impact is massive - biggest use case is something like newest-first, but to do that i need to run stat on each file to get its mtime - so overhead of list on a slow mount point is massive - for 5k images, initial response went up from 0.3sec to 5.7sec.

@lbeltrame
Copy link
Author

Ok, then it's likely not worth it.

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

No branches or pull requests

2 participants