Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33354
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <andrea.crotti.0@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'subsequent': 0.04; 'linux,': 0.05; 'memory.': 0.05; 'sys': 0.05; 'run,': 0.07; 'python': 0.09; '/dev/null': 0.09; 'flush': 0.09; 'itself,': 0.09; 'subject:files': 0.09; 'zero.': 0.09; 'cc:addr :python-list': 0.10; 'anyway': 0.11; 'flushed': 0.16; 'pipe,': 0.16; 'pipes': 0.16; 'subprocess': 0.16; 'think?': 0.16; 'thread.': 0.16; 'wrote:': 0.17; 'shell': 0.18; 'pipe': 0.22; 'received:mail-bk0-f46.google.com': 0.22; 'runs': 0.22; 'work,': 0.22; "i'd": 0.22; 'idea': 0.24; 'second': 0.24; 'cc:2**1': 0.24; 'linux': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'cc:addr:gmail.com': 0.27; 'received:209.85.214.46': 0.27; 'rest': 0.28; 'run': 0.28; 'ahead.': 0.29; 'buffers': 0.29; 'cat': 0.29; 'subject:size': 0.29; 'no,': 0.29; 'maybe': 0.29; 'launch': 0.32; 'not.': 0.32; 'running': 0.32; 'could': 0.32; 'goes': 0.33; 'curious': 0.33; 'zero': 0.33; 'times.': 0.33; 'skip:d 20': 0.34; 'program,': 0.34; 'received:google.com': 0.34; 'done': 0.34; 'said,': 0.35; 'doing': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'message- id:@gmail.com': 0.36; 'wanted': 0.36; "didn't": 0.36; 'anything': 0.36; 'test': 0.36; 'two': 0.37; 'received:209': 0.37; 'well.': 0.37; 'subject:: ': 0.38; 'received:209.85.214': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'subject:-': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'your': 0.60; 'real': 0.61; 'first': 0.61; 'within': 0.64; 'timings': 0.84; 'drops': 0.91; 'angel': 0.93; 'subject:limited': 0.93 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=vEUMh5xw81kbEZaiTSx6cc2nW91gRcKomn6wgzY+iEU=; b=cINs6wUP1Da7f17D4HbDgiswNSlr4XV6zCYvJSqDc1DXUqd8RqdEO7mOwe6+OP6O/f COgKD40ur1CWNd/72T1BHeI4zlQWp+P/UPY70V4cpNL6Lj8dsJ09yw+xYVFqlN0+2crJ Y4Adh5YjLILf06hPOap/Ow4ro3fx7VrN807IwY/tDOeGdVPy0hy6CLHj+3tSapF5dKIB J2ToEbO9crfmlrgJS4hBvRe2A88/CqTNZ1gGslKCzVoiBtTjV51YaJn0jsmFagOce0dg QSdx+U1TweSwmtI4nh3Ur28Pab6X0ci6ZMorFhdPjElaJaGzGd8m+pecTHHRHXMg8DsQ sTDg== |
| Date | Wed, 14 Nov 2012 20:43:59 +0000 |
| From | Andrea Crotti <andrea.crotti.0@gmail.com> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121012 Thunderbird/16.0.1 |
| MIME-Version | 1.0 |
| To | d@davea.name |
| Subject | Re: creating size-limited tar files |
| References | <mailman.3381.1352308430.27098.python-list@python.org> <509AD812.2060605@gmail.com> <CAHVvXxTH7WrfT41GDj15f9FS4eguBF2dj4Khpu_vw2TWMkvPYg@mail.gmail.com> <CAF_E5JbY71J3ix9PiXu7wvvkzc_aG9ZtdwKkuxXXAU-SFeRDsw@mail.gmail.com> <CAF_E5JYJ7Fw4b4z81454k9HwmjZ49qjx48fC_f+skcphCDNUeA@mail.gmail.com> <CAF_E5Jas3ObdX=Mhusj63R_Xcm0e1JwjPEuOgZoggON6-cttjA@mail.gmail.com> <CAF_E5JZFJ+TPmF0LUEFU8AVqbOWfJbH9Yy60CKkcrDNnWATiVg@mail.gmail.com> <CALwzidnrTcSK+Z0cGf5WpTN2sLqVgbpbt2i1DcdUFnGQYEvKQg@mail.gmail.com> <87lie4lnxr.fsf@nitrogen.i-did-not-set--mail-host-address--so-tickle-me> <CALwzidkfARHC5Twpw01xQrOWe4msWdLSH2B=5i4oMwadPyQniA@mail.gmail.com> <87fw4clg8b.fsf@nitrogen.i-did-not-set--mail-host-address--so-tickle-me> <CAF_E5JYYEQ77rEQb1tM5tDKbTTSwYNVv1An57bUKn8Y_d-VJUQ@mail.gmail.com> <CAF_E5Jbk2inQbTrurgBKP2DLjzR9=t4XXSGbafuq-E3UvJjaiw@mail.gmail.com> <50A3C287.80707@davea.name> <CAF_E5JaH332cJXko7iLuhNfxyrhE9oeUz3wMZ51XVx5CFE29kw@mail.gmail.com> <50A3C7D7.7050103@davea.name> |
| In-Reply-To | <50A3C7D7.7050103@davea.name> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Cc | Python <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3698.1352925924.27098.python-list@python.org> (permalink) |
| Lines | 40 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1352925924 news.xs4all.nl 6984 [2001:888:2000:d::a6]:48886 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:33354 |
Show key headers only | View raw
On 11/14/2012 04:33 PM, Dave Angel wrote: > Well, as I said, I don't see how the particular timing has anything to > do with the rest of the thread. If you want to do an ls within a Python > program, go ahead. But if all you need can be done with ls itself, then > it'll be slower to launch python just to run it. > > Your first timing runs python, which runs two new shells, ls, and cat. > Your second timing runs ls and cat. > > So the difference is starting up python, plus starting the shell two > extra times. > > I'd also be curious if you flushed the system buffers before each > timing, as the second test could be running entirely in system memory. > And no, I don't know offhand how to flush them in Linux, just that > without it, your timings are not at all repeatable. Note the two > identical runs here. > > davea@think:~/temppython$ time ls -lR ~ | cat > /dev/null > > real 0m0.164s > user 0m0.020s > sys 0m0.000s > davea@think:~/temppython$ time ls -lR ~ | cat > /dev/null > > real 0m0.018s > user 0m0.000s > sys 0m0.010s > > real time goes down by 90%, while user time drops to zero. > And on a 3rd and subsequent run, sys time goes to zero as well. > Right I didn't think about that.. Anyway the only thing I wanted to understand is if using the pipes in subprocess is exactly the same as doing the Linux pipe, or not. And any idea on how to run it in ram? Maybe if I create a pipe in tmpfs it might already work, what do you think?
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
creating size-limited tar files andrea crotti <andrea.crotti.0@gmail.com> - 2012-11-07 17:13 +0000
Re: creating size-limited tar files Neil Cerutti <neilc@norwich.edu> - 2012-11-07 18:40 +0000
Re: creating size-limited tar files Alexander Blinne <news@blinne.net> - 2012-11-07 20:05 +0100
Re: creating size-limited tar files Roy Smith <roy@panix.com> - 2012-11-07 15:32 -0500
Re: creating size-limited tar files Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-11-07 21:52 +0000
Re: creating size-limited tar files Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2012-11-07 23:15 +0000
Re: creating size-limited tar files andrea crotti <andrea.crotti.0@gmail.com> - 2012-11-08 10:11 +0000
Re: creating size-limited tar files andrea crotti <andrea.crotti.0@gmail.com> - 2012-11-08 10:29 +0000
Re: creating size-limited tar files andrea crotti <andrea.crotti.0@gmail.com> - 2012-11-09 10:39 +0000
Re: creating size-limited tar files andrea crotti <andrea.crotti.0@gmail.com> - 2012-11-13 10:31 +0000
Re: creating size-limited tar files Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-13 09:07 -0700
Re: creating size-limited tar files Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-13 09:25 -0700
Re: creating size-limited tar files Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-13 09:30 -0700
Re: creating size-limited tar files Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2012-11-14 11:35 +0530
Re: creating size-limited tar files Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-14 00:22 -0700
Re: creating size-limited tar files Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2012-11-14 14:21 +0530
Re: creating size-limited tar files andrea crotti <andrea.crotti.0@gmail.com> - 2012-11-14 11:52 +0000
Re: creating size-limited tar files andrea crotti <andrea.crotti.0@gmail.com> - 2012-11-14 15:56 +0000
Re: creating size-limited tar files Dave Angel <d@davea.name> - 2012-11-14 11:10 -0500
Re: creating size-limited tar files andrea crotti <andrea.crotti.0@gmail.com> - 2012-11-14 16:16 +0000
Re: creating size-limited tar files Dave Angel <d@davea.name> - 2012-11-14 11:33 -0500
Re: creating size-limited tar files Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-11-14 20:43 +0000
Re: creating size-limited tar files Dave Angel <d@davea.name> - 2012-11-14 15:57 -0500
csiph-web