automatic icon indicating copy to clipboard operation
automatic copied to clipboard

[Feature]: "Reload" button for the gallery

Open lbeltrame opened this issue 1 year ago • 3 comments

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: 22465103 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 avatar Apr 05 '24 20:04 lbeltrame

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 avatar Apr 06 '24 02:04 vladmandic

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.

vladmandic avatar Apr 07 '24 16:04 vladmandic

Ok, then it's likely not worth it.

lbeltrame avatar Apr 07 '24 20:04 lbeltrame