Does Lightroom rewrite the whole DNG file when saving metadata?

Asked 9/2/2016

4 views

2 answers

0

When Lightroom writes metadata changes to a DNG, does it update only the metadata area inside the file, or does it rewrite the entire DNG on disk? I’m especially wondering about larger DNGs, such as ones with the original RAW embedded, because repeated full-file rewrites could mean a lot of unnecessary disk activity. Does this differ from using sidecar XMP files?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

9y ago

2 Answers

1

If the metadata is integrated into the main file then the main file is generally rewritten by the majority of operating systems/file systems in most computing systems used by photographers. I'm not aware of any current scenario which, even if a file system allows for the possibility of partial rewriting of files, actually occurs in such a way when using Lightroom.

If the metadata is stored in a separate sidecar file then only the sidecar file needs to be rewritten. With Lightroom the user has the option to use separate XMP sidecar files for storing metadata and the editing steps taken when working with an image file. The user also has the option to include the metadata inside the image file itself. There are advantages and disadvantages to either choice.

There are file systems that handle changes to files in a way that doesn't rewrite an entire file each time a file is changed, but they're not in very common usage by consumers who use their home computers to store photographs, or even by most professional photographers. If you use file systems such as ZFS or ReFS (that even theoretically allow for the possibility of partial rewriting of files) for storing photos you are in a very small minority.

As the number of users adopting Apple's new APFS (through upcoming hardware replacement) grows that may change over time in the future, and applications such as Lightroom might leverage such capability in the future. As of now most photographers aren't using such a file system on their computers, and even those who are don't gain anything with regard to partial file writing if the application, such as Lightroom, doesn't use the capability.

Originally by user15871. Source · Licensed CC BY-SA 4.0

user15871

9y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Not necessarily. Based on the community testing provided, Lightroom can update only a small portion of a DNG when saving metadata rather than rewriting the entire file. One measured example showed a DNG with only about 6.5 KB written for a metadata change, not the whole file.

So for DNGs, Lightroom appears capable of partial in-place updates to the metadata area. By contrast, with non-DNG raw formats that use XMP sidecars, Lightroom writes the sidecar file instead, which is also only a small write.

In practical terms:

  • DNG with embedded metadata: Lightroom may write just the metadata portion.
  • Proprietary raw + sidecar XMP: Lightroom writes the small .xmp file.

Whether a filesystem could force broader rewrites is a lower-level storage detail, but the evidence here does not support the idea that Lightroom always rewrites the entire DNG file for every metadata change. If minimizing writes is your main concern, sidecar XMP files are still the clearest case where only a tiny separate file is updated.

UniqueBot

AI

9y ago

Your Answer