Write tags only when changed - #608
Conversation
|
Sorry for the extremely long delay on reviewing this! I've had a few notes I wanted to jot down here but haven't gotten around to typing them up. My apologies. (Also, it now seems like we may be converging on another solution in #644, so these thoughts may be irrelevant anyway. 😳) Overall, I totally understand the motivation for centralizing this logic in
These issues might be mostly benign, but it's good to keep them in mind if we do this (and possibly to provide a way to work around dirty-tracking to avoid them when necessary). |
|
Thanks for the deep insight and digging up bugs I haven’t thought about. Points 2 and 3 also apply to #644, so I’d like to shift the discussion there. In fact, we should postpone this PR until #644 is resolved since it implements parts of this.
That’s why I set the dirty flag to false at the end of |
2ded210 to
4b11eed
Compare
|
@geigerzaehler I know it's been quite a long time since you opened this PR, but as a heads up, we're planning to extract MediaFile to an independent Python package & git repository (see #3237). Do you still think this PR is worth pursuing? If so we'll need to move it over to the new repository. |
|
Closing as abandoned/deals with MediaFile |
This was previously discussed in #527 and some questions came up.
It’s better to be on the safe side and perform unnecessary writes instead of missing necessary ones. Also
mgfileshould never ever be changed.deleteis handled here and tested hereFiles are not read twice since all tags are cached when the
mgfileis created.