[Python-Dev] Fixing #7175: a standard location for Python config files (original) (raw)

Andrew Bennetts andrew at bemusement.org
Fri Aug 13 04:00:37 CEST 2010


Antoine Pitrou wrote:

On Thu, 12 Aug 2010 18:14:44 -0400 Glyph Lefkowitz <glyph at twistedmatrix.com> wrote: > > On Aug 12, 2010, at 6:30 AM, Tim Golden wrote: > > > I don't care how many stats we're doing > > You might not, but I certainly do. And I can guarantee you that the > authors of command-line tools that have to start up in under ten > seconds, for example 'bzr', care too.

The idea that import time is dominated by stat() calls sounds rather undemonstrated (and unlikely) to me.

In the case of bzr startup, the exact breakdown varies depending on a range of factors like OS and whether the relevant parts of the filesystem are in the OS cache or not (i.e. is this the first time the user has run bzr since booting?).

The short answer is that the number of stat calls isn't really the problem at the moment for bzr, at least not compared to the number of directories Python searches, and the amount of non-trivial work done at import time by many modules. But... Your Mileage May Vary.

Here's the longer answer:

I think some stats about this have been posted to this list before, but some points of interest from the top of my head:

-Andrew.



More information about the Python-Dev mailing list