[Issue 21593] New: Only update file time if file to be written already exists

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 30 07:57:15 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21593

          Issue ID: 21593
           Summary: Only update file time if file to be written already
                    exists
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at digitalmars.com

This is a suggestion from Andrei.

Because file writes are so much slower than reads, and because of weak
dependency management in build systems, the compiler will often generate the
same files again and again. This changes file writes to first see if the file
already exists and is identical. If so, it just updates the last written time
on that file instead of writing a new one.

We discussed whether to "touch" the file or not, and decided if it wasn't
touched, it would likely break many build systems.

--


More information about the Digitalmars-d-bugs mailing list