I do not want any swap file, backup file ... be created, because […] those unnecessary writes means use of energy and hardware wear

Did you measure that they are? I mean, in either case the whole file is re-written, the only question is where it is. The additional operation is the rename, but nothing else (yes, it's one more write, adjusting the directory entry, I must admit).
It would actually save things if, and only if there was an environmentally efficient (and that's a big question on what is the best trade-off between more writes or more CPU cycles to avoid writes) "do not write if identical to current data" implemented in the file system (or some place down the line).

If you want to save energy, I suggest you close apps like Caja when not needed because they monitor files and get the updates, that's likely a whole lot more costly than updating the directory entry. And I won't talk about not using any modern web browser, or rather website, because that's likely a nightmare :)

Unnecessary because if in 10.000 cases there are 1 case with a problem that is not a tragedy.

Well, hopefully it's not, but if might depend on what is actually lost. And yes, it should not happen, but when it actually does it might be painful -- and what is the cost of restoring the lost data?


Anyway, if it's so much of a concern to you, I suggest you patch GIO itself not to do that for your usage. I doubt you could convince upstream to change this to something that doesn't offer the same level of safety (although there is probably still a current bug that makes this safety moot, e.g. in case of not enough space to write the file), but you could also try and sell it there.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/repo-discussions/3697/comments/7613911@github.com>