diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-07-01 03:42:49 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-07-01 03:42:49 +0000 |
commit | e0f225831faa3d8ecce32920e2c253a046c6f9ce (patch) | |
tree | 522f023e9ce3d6e303b8f4b8669df32585d75f48 /package/busybox | |
parent | c63f9b3097b8463424e0a68af43bb3bd2e6b7d35 (diff) | |
download | upstream-e0f225831faa3d8ecce32920e2c253a046c6f9ce.tar.gz upstream-e0f225831faa3d8ecce32920e2c253a046c6f9ce.tar.bz2 upstream-e0f225831faa3d8ecce32920e2c253a046c6f9ce.zip |
massively reduce the number of forks that busybox ash has to do while processing our scripts this is accomplished simply by changing the order in which it looks for builtins and applets
SVN-Revision: 7815
Diffstat (limited to 'package/busybox')
-rw-r--r-- | package/busybox/patches/270-ash_performance.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/package/busybox/patches/270-ash_performance.patch b/package/busybox/patches/270-ash_performance.patch new file mode 100644 index 0000000000..eff7a5bb11 --- /dev/null +++ b/package/busybox/patches/270-ash_performance.patch @@ -0,0 +1,30 @@ +Index: busybox-1.4.2/shell/ash.c +=================================================================== +--- busybox-1.4.2.orig/shell/ash.c 2007-07-01 05:33:08.371737750 +0200 ++++ busybox-1.4.2/shell/ash.c 2007-07-01 05:33:11.703946000 +0200 +@@ -3957,12 +3957,6 @@ + } + #endif + +- if (is_safe_applet(name)) { +- entry->cmdtype = CMDNORMAL; +- entry->u.index = -1; +- return; +- } +- + updatetbl = (path == pathval()); + if (!updatetbl) { + act |= DO_ALTPATH; +@@ -4074,6 +4068,12 @@ + goto success; + } + ++ if (is_safe_applet(name)) { ++ entry->cmdtype = CMDNORMAL; ++ entry->u.index = -1; ++ return; ++ } ++ + /* We failed. If there was an entry for this command, delete it */ + if (cmdp && updatetbl) + delete_cmd_entry(); |