speed improvement in setup -> bootmanager

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
xmf-149
Posts: 2
Joined: Mon Sep 02, 2024 11:08 pm

speed improvement in setup -> bootmanager

Post 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.

williams2
Posts: 1065
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 306 times

Re: speed improvement in setup -> bootmanager

Post 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

Post Reply

Return to “Users”