Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #15688
| Date | 2011-11-14 20:34 +0100 |
|---|---|
| From | Christian Heimes <lists@cheimes.de> |
| Subject | Re: Py2.7/FreeBSD: maximum number of open files |
| References | (4 earlier) <mailman.2705.1321290230.27778.python-list@python.org> <e3901b26-33ab-41b4-a8b1-82d08f15c125@u6g2000vbg.googlegroups.com> <634914A010D0B943A035D226786325D42D0C26481A@EXVMBX020-12.exch020.serverdata.net> <j9rl5k$5i1$1@dough.gmane.org> <634914A010D0B943A035D226786325D42D0C26485F@EXVMBX020-12.exch020.serverdata.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2711.1321299276.27778.python-list@python.org> (permalink) |
Am 14.11.2011 19:28, schrieb Tobias Oberstein: > Thanks! This is probably the most practical option I can go. > > I've just tested: the backported new IO on Python 2.7 will indeed > open >32k files on FreeBSD. It also creates the files much faster. > The old, non-monkey-patched version was getting slower and > slower as more files were opened/created .. I wonder what's causing the O(n^2) behavior. Is it the old file type or BSD's fopen() fault? > There seem to be slight differences though: > > Non-monkey patched: I can write to the file a non-Unicode string, > even when the file was opened non-Binary. > > With monkey patch: either open the file Binary-mode, or > write Unicode strings .. Python 3.x doesn't collate data and text but distinguishes between bytes (str type in Python 2.x) and unicode. You can't write unicode to a binary file and str to a text file. See it as an opportunity! You are taking the first step towards Python 3 compatibility. :) Christian
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
AW: Py2.7/FreeBSD: maximum number of open files Tobias Oberstein <tobias.oberstein@tavendo.de> - 2011-11-14 09:03 -0800
Re: Py2.7/FreeBSD: maximum number of open files Jon Clements <joncle@googlemail.com> - 2011-11-14 09:33 -0800
AW: Py2.7/FreeBSD: maximum number of open files Tobias Oberstein <tobias.oberstein@tavendo.de> - 2011-11-14 09:46 -0800
Re: Py2.7/FreeBSD: maximum number of open files Christian Heimes <lists@cheimes.de> - 2011-11-14 19:03 +0100
AW: Py2.7/FreeBSD: maximum number of open files Tobias Oberstein <tobias.oberstein@tavendo.de> - 2011-11-14 10:28 -0800
Re: Py2.7/FreeBSD: maximum number of open files Christian Heimes <lists@cheimes.de> - 2011-11-14 20:34 +0100
Re: Py2.7/FreeBSD: maximum number of open files Chris Torek <nospam@torek.net> - 2011-11-30 19:29 +0000
csiph-web