Patchwork D2704: archival: fileit should not use atomictemp, causes major performance regression

login
register
mail settings
Submitter phabricator
Date March 6, 2018, 10:09 p.m.
Message ID <differential-rev-PHID-DREV-kry3gv2afa6cei7d5p7q-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29078/
State Superseded
Headers show

Comments

phabricator - March 6, 2018, 10:09 p.m.
vincent.parrett created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2704

AFFECTED FILES
  mercurial/archival.py

CHANGE DETAILS




To: vincent.parrett, #hg-reviewers
Cc: mercurial-devel
phabricator - March 6, 2018, 10:18 p.m.
vincent.parrett added a comment.


  This change results in around a 20% performance increase when archiving to a folder.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2704

To: vincent.parrett, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -267,7 +267,7 @@ 
         if islink:
             self.opener.symlink(data, name)
             return
-        f = self.opener(name, "w", atomictemp=True)
+        f = self.opener(name, "w", atomictemp=False)
         f.write(data)
         f.close()
         destfile = os.path.join(self.basedir, name)