From: Ranousse <ran...@gm...> - 2012-02-24 19:14:31
|
I've just noticed that when pressing F2 to launch a terminal, notion creates 3 processes 1) sh 2) xterm 3) zsh (my default shell) In this case it would be better to have only 2) and 3). I compared this to system( "xterm" ) in C, and obtained the same number processes (three). So I guess notion uses system to launch external applications (I did not check). The problem is the same with F3 F3 xpdf => 2 processes (sh and xpdf) F3 :mutt => 3 processes (sh, xterm and mutt) When I discovered this, it surprised me a little since I already did checks like this in the past and never noticed the unnecessary sh processes. And indeed I did not have the problem in the past. A that time I used a Debian etch where sh was a linked to bash. After bash -c xpdf, you only have once process xpdf. But now (Debian squeeze) sh points to dash, and after dash -c xpdf, there are two processes (sh and xpdf). The difference seems to be that bash is able to optimize a little the number of processes in case there's only one process after the -c (adding I guess a king of exec). For information, vim which also allows to run external applications in the same ways as notion F3 key does not create the unecessary processes (even with the change for sh from bash to dash). Not sure it's very important. But maybe it could interest you. (after all it means that the number of processes of a notion user is almost multiplied by 2). |