pythongosssss / ComfyUI-Custom-Scripts

Enhancements & experiments for ComfyUI, mostly focusing on UI features
MIT License
1.76k stars 137 forks source link

Would it be silly to add option for Alternate Data Stream storage for hashes? #321

Open UrzasLegacy opened 2 months ago

UrzasLegacy commented 2 months ago

I don't like the management of hash files so I've been using NTFS Alternate Data Streams for storing hashes in my own projects. This works wonderfully for me in my specific environment.

I've also adapted pythongosssss' view info to prioritize using ADS as well, but I'm hesitant to make a pull request because ADS is Windows specific and only available on NTFS filesystems. So ideally, an OS check and filesystem check would need to be performed and the option disabled to the user if it's not available. I'm a total noob with the frontend side of things, so I don't have any of the UI stuff written.

Also, I'm not sure if this introduces security concerns or if there are some other things to consider.

But I figured it might be a nice option for users to have, so thought I'd ask!

NeedsMoar commented 4 weeks ago

The only real problem with NTFS alternate streams is that very few people know about them. Hash data isn't large enough that I'd worry about storing it there. I think small alternate streams have advantages for disk space over a seperate small text file but it's been a while since I read the info on their structure on disk. I'd certainly rather see them used for things like hashes that are absolutely tied to a file than text files which then have to be manually renamed. If they're not an acceptable option even a CSV file covering all files in that directory with name,hash would be more disk-efficient.

I'm pretty sure ReFS supports them too. If someone is still using FAT32 they kinda deserve breakage. ;-)