Mercurial > hg
changeset 33923:e6d421566906
journal: do not use atomictemp (issue5338)
Writing journal files using `atomictemp` leads to quadratic performance that
could be problematic if automation runs many commands. Other logs like
blackbox does not use atomictemp, and journal logs are not critical for repo
correctness. So let's make them non-atomictemp.
Differential Revision: https://phab.mercurial-scm.org/D517
author | Jun Wu <quark@fb.com> |
---|---|
date | Thu, 24 Aug 2017 21:43:54 -0700 |
parents | 1a6707b43d05 |
children | b9101467d88b |
files | hgext/journal.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/journal.py Tue Aug 22 14:26:25 2017 -0400 +++ b/hgext/journal.py Thu Aug 24 21:43:54 2017 -0700 @@ -342,7 +342,7 @@ with self.jlock(vfs): version = None # open file in amend mode to ensure it is created if missing - with vfs('namejournal', mode='a+b', atomictemp=True) as f: + with vfs('namejournal', mode='a+b') as f: f.seek(0, os.SEEK_SET) # Read just enough bytes to get a version number (up to 2 # digits plus separator)