Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Pipes vs. temporary files

by bluto (Curate)
on Jul 25, 2007 at 20:33 UTC ( #628787=note: print w/ replies, xml ) Need Help??


in reply to Pipes vs. temporary files

One issue with a pipe is that if the producer process dies, the consumer may wait forever on the pipe after processing part of the data. The benefit of a temporary file in this case is that you an ensure you have all of the data before processing it (i.e. by having the producer rename the file into the final name that the consumer expects). This may or may not matter to you.

Another problem with pipes is that if you use them on a single processor machine you may see a lot of context switching as the OS switches between the producer and consumer (i.e. each time the pipe is filled -- usually after about 4KB).


Comment on Re: Pipes vs. temporary files

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://628787]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2014-09-24 01:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (243 votes), past polls