[PATCH] osutil: introduce a posixfile type for Unix
Isaac Jurado
diptongo at gmail.com
Fri Apr 13 02:28:25 CDT 2012
On Thu, Apr 12, 2012 at 11:06 PM, Bryan O'Sullivan <bos at serpentine.com> wrote:
> # HG changeset patch
> # User Bryan O'Sullivan <bryano at fb.com>
> # Date 1334264798 25200
> # Node ID 231bfc0704e37b0eea300fc1a4ada302171de394
> # Parent 0057f7b2f0671ae10622be34cf6cde0aa3848a80
> osutil: introduce a posixfile type for Unix
>
> This improves general file performance by about 10% compared to
> Python's native file type. The main improvement comes from bypassing
> stdio and using Unix system calls directly. A smaller additional
> effect is due to (by default) not allowing other Python threads to
> run during potentially blocking system calls, on the assumption
> that hg is a single-threaded app.
Out of curiosity: is this true for all Unix flavours?
I mean, Linux has a pretty efficient page cache that makes buffering an
annoyance in most of the cases. But, do all Unices behave the same?
Cheers.
--
Isaac Jurado
"The noblest pleasure is the joy of understanding"
Leonardo da Vinci
More information about the Mercurial-devel
mailing list