add sh/bash to pain list
Posted Feb 22, 2007 0:16 UTC (Thu) by tetromino
In reply to: add sh/bash to pain list
Parent article: The Road to KDE 4: CMake, a New Build System for KDE (KDE.News)
> shell based on a modern scripting language
On my machine, a newly-started bash process uses <500K of unshared memory. A newly started python process uses over 1.6M of unshared memory. So if you are like me, having a couple dozen terminal windows open at once, using a python-based shell would mean quite a bit of memory wasted. Now consider that every rc script is a shell script, and that the launchers for a significant percentage of programs are in fact shell scripts, and you can see why python shells aren't exactly popular. In fact, some people are considering switching to minimalistic shells like ash (~100K) and busybox (even less) for non-interactive use.
As for interactive use, I generally don't find myself using a lot of advanced shell features. For-loops are about the most advanced shell syntax I use in interactive mode. For anything more complex, I find that it's generally a better idea to write a brief perl script and save it for later use - for one thing, you don't need to retype a twenty-line function when you need it a month later.
to post comments)