simonfuhrmann / mve

Multi-View Environment
http://www.gcc.tu-darmstadt.de/home/proj/mve/
Other
977 stars 419 forks source link

Save space by hardlinking instead of copying #546

Open lvella opened 3 years ago

lvella commented 3 years ago

It would be nice if inside of view_xxxx.mve directory, the file original.jpg was a hardlink of the original, instead of copy (when possible). This would save hard disk space.

simonfuhrmann commented 2 years ago

That sounds like a good idea. Instead of hard links, I'd suggest soft links though. Because these work across file system boundaries. The steps to achieve this would be:

Are you interested in implementing this?

lvella commented 2 years ago

I for myself think hardlink is better because it won't be affected if the originals are deleted or moved, which works more transparently and can be the default option, benefiting most users without affecting their usage.

If hardlink can't be created, be it because the OS doesn't support or because it crosses filesystem boundaries, it fallbacks to copying.

A switch to enable softlink can be an enhancement independent of this: it works on more situations, but requires user's attention.

What do you think?

simonfuhrmann commented 2 years ago

Then we should just have two options perhaps, --softlink-originals and --hardlink-originals, to make it very explicit what is happening. In terms of fallback, I'd rather fail then falling back, again, to make it very explicit what is happening. I'd also suggest to do the same on non-Linux systems: fail if one of the options is used.