[erlang-questions] os:cmd/1 performance issue

Wes James <>
Tue Nov 26 23:56:47 CET 2013

On Tue, Nov 26, 2013 at 2:18 PM, Marouene Lakhdhar <
> wrote:

> Hi,
> I'm facing a performance issue with os:cmd/1. it takes about 5 secs to
> return the result however if i execute the commande with cmd.exe, the
> reuslt will be immediately displayed.
> I'm using erl5.10.3 under windows 7.
> Could you please help me how to avoid the extra time  when usung os:cmd/1?
> Thanks,
> Marouene.
I just brought up a machine with ESysMan, coped over an any.cmd with "echo
hello>hello.txt"  and executed the any.cmd file and it created a file
hello.txt pretty much right after I executed it.

I do it like this:


Just a simple call to os:cmd(...)

I also put

C:\Program Files\erl5.9.3.1\erts-\bin

at beginning of the System Variables, Path variable.  It's hard to tell why
yours is slow with no context of how you are using it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131126/16c6b055/attachment.html>

More information about the erlang-questions mailing list