in reply to Re: exec vs. backtick-and-assign performance
in thread exec vs. backtick-and-assign performance
It still seems odd to me that the code called by exec() runs basically instantly while using backticks it literally takes several minutes to complete the task and print the output. There must be something I'm overlooking.
From what you said, it sounds like backticks actually use the exec() function -- unless you meant something else. Is that the case?
"the two programs aren't at all equivalent, since a successful call to exec() never returns. (You probably know that, but still)."
Yeah, I was aware of that, and that's one of the reasons I tried the backticks first (in case I ended up doing more after running the shell command). It looks like I'll just have to make sure running that command is the absolute last thing the script does, unless I want to either write a lot more code to get the same result as intended with backticks (but faster) or suffer some really unacceptable performance lags on a simple admin script.
|
- apotheon
CopyWrite Chad Perrin |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: exec vs. backtick-and-assign performance
by Joost (Canon) on Nov 12, 2006 at 22:42 UTC | |
by apotheon (Deacon) on Nov 12, 2006 at 23:48 UTC | |
by Joost (Canon) on Nov 13, 2006 at 00:08 UTC | |
by apotheon (Deacon) on Nov 13, 2006 at 00:24 UTC |