Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!turnkey!orchard.la.locus.com!fafnir.la.locus.com!rorex From: rorex@locus.com (Phil Rorex) Newsgroups: comp.unix.questions Subject: Re: Can UNIX pipe connections be compiled? Message-ID: <1991Jan24.022812.3033158@locus.com> Date: 24 Jan 91 02:28:12 GMT References: <1991Jan18.193234.216@rucs.runet.edu> <1991Jan19.040325.8815@druid.uucp> Organization: Locus Computing Corporation, Inglewood, CA Lines: 50 >In article <1991Jan18.193234.216@rucs.runet.edu> Dana Eckart writes: >>Does there exist a piece of software (or is it even possible) to compile >>a pipe? In particular, suppose you had >> ls -l | fgrep "Dec" | cut -f 4 >>is there anyway to compile the above pipeline so that the pieces can >>communicate more quickly. I am looking for a general solution, not >>one that works only for the above example. > > >I don't see how. Any program that was created from the above line would >have to do everything the shell does when it sees that line and that >program has to be loaded and run as well. If anything such a program >would slow it down. > >Just a thought BTW - are you running out of memory? If you are right I agree. Don't overlook this. ^^^^^^^^^^^^^^^^^^^^^ >at the low limit you may be swapping when you get a large enough pipe. >My motherboard died recently and I have been running on a borrowed one >with less memory and I see a lot of slowdown with it. The swapping is >quite noticeable. > >-- >D'Arcy J.M. Cain (darcy@druid) | >D'Arcy Cain Consulting | There's no government >West Hill, Ontario, Canada | like no government! >+1 416 281 6094 | I've split up many a long pipe because of excessive paging. On a heavily loaded machine, ls -l > /tmp/tmp.$$.1 fgrep "Dec" < /tmp/tmp.$$.1 > /tmp/tmp.$$.2 cut -f 4 < tmp.$$.2 rm /tmp/tmp.$$.[12] & can get in and out before all the pieces of the pipeline ls -l | fgrep "Dec" | cut -f 4 ever even get loaded in. BTW, I've found egrep to be faster than fgrep on the paging unix's I've been on for scenario's like yours. _ Your mileage may vary. +1 213 337-5062 |_) |_ . | ...!{ucla-se|uunet}!lcc!rorex Phillip Rorex | | ( | | rorex@locus.com Disclaimer: I speak only for myself -- _ +1 213 337-5062 |_) |_ . | ...!{ucla-se|uunet}!lcc!rorex Phillip Rorex | | ( | | rorex@locus.com Disclaimer: I speak only for myself