Page 1 of 1

speed improvement in setup -> bootmanager

Posted: Wed Sep 04, 2024 11:58 pm
by xmf-149

the default desktop icon "setup" (actually wizardwizard) -> "configure startup" (bootmanager)
there was also menu entries for this item under "system" and also "setup".
this patch is specifically for the "add a new module" button, (even though I personally haven't loaded a module since 2016 (sound modules)).

in "which bootmanager" put the following around
"for ONEMOD in $ALLMODULES"

Code: Select all

 if test true;then #because there are so many $ALLMODULES
 echo -n "$LOADEDMODULES"|tr ' ' '\n' >/tmp/bootmanager_pattern
 echo -n "$ADDLIST"|tr ' ' '\n'|sed 's/:$//' >>/tmp/bootmanager_pattern
 MODLIST="$MODLIST "$(echo -n "$(echo -n "$ALLMODULES"|tr ' ' '\n'|rev|cut -f1 -d/|cut -f2- -d.|rev|
 grep -vxf /tmp/bootmanager_pattern|sed 's/.*/& & off/')"|tr '\n' ' ')
 rm /tmp/bootmanager_pattern
 else

 fi

this gave the exact same output, but was much faster.
I am suggesting this be merged into the official copy of the tool.


Re: speed improvement in setup -> bootmanager

Posted: Thu Sep 05, 2024 8:49 pm
by williams2

In this code:

Code: Select all

if test true
then
  aaa
else
  bbb
fi

aaa always executes
bbb never executes

So the code can be replaced with just aaa

true and test false are also always true,
so the result is the same:

aaa always executes
bbb never executes

if false is always false,
so for if false

aaa never executes
bbb always executes