All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: Daniel Kiper <daniel.kiper@oracle.com>,
	 Vladimir phcoder Serbinenko <phcoder@gmail.com>,
	 grub-devel <grub-devel@gnu.org>,
	Paul Menzel <pmenzel@molgen.mpg.de>,
	 Robbie Harwood <rharwood@redhat.com>
Subject: Re: [PATCH v3] grub-mkconfig linux: Fix quadratic algorithm for sorting menu items
Date: Thu, 19 May 2022 16:52:54 -0400 (EDT)	[thread overview]
Message-ID: <1711366171.63066.1652993574862.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20220519183603.i2i4qz67ume3eagd@tomti.i.net-space.pl>

----- On May 19, 2022, at 2:36 PM, Daniel Kiper dkiper@net-space.pl wrote:
[...]
> 
> Could you do the same in util/grub.d/20_linux_xen.in? Both should be
> kept in sync. And you are not first one who updates 10_linux.in only.
> If you could make a patch which adds something like "Keep logic in sync
> with..." to the util/grub.d/10_linux.in and util/grub.d/20_linux_xen.in
> that would be perfect.

AFAIU, 20_linux_xen.in does:

while [ "x${xen_list}" != "x" ] ; do
    list="${linux_list}"
    current_xen=`version_find_latest $xen_list`
    [....]
    while [ "x$list" != "x" ] ; do
        linux=`version_find_latest $list`
        [...]
        list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
    done
    if [ x"$is_top_level" != xtrue ]; then
        echo '  }'
    fi
    xen_list=`echo $xen_list | tr ' ' '\n' | fgrep -vx "$current_xen" | tr '\n' ' '`
done

Which adds yet another loop iterating on each item of "xen_list". For each of those,
there is an iteration on "linux_list".

I can do the change, like I can do the change for other OSes, but I don't have
the environment to test those changes. Would you be OK if I submit an untested
patch for someone else to try out ?

I notice that 10_hurd.in and 10_kfreebsd.in also have the exact same inefficient pattern.
Would you be OK if I also change them and let the change be tested by those who have
those environments ?

> 
> Did you consider Oskari's comment sent in the other email?

I just did, sorry for the delay, I missed his email because it was only
sent to the list.

Thanks,

Mathieu

> 
> Daniel

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


  reply	other threads:[~2022-05-19 20:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 14:24 [PATCH v3] grub-mkconfig linux: Fix quadratic algorithm for sorting menu items Mathieu Desnoyers
2022-05-05 15:04 ` Robbie Harwood
2022-05-05 23:02 ` Oskari Pirhonen
2022-05-19 20:29   ` Mathieu Desnoyers
2022-05-19 18:36 ` Daniel Kiper
2022-05-19 20:52   ` Mathieu Desnoyers [this message]
2022-05-20  5:00     ` Oskari Pirhonen
2022-05-20 11:01     ` Daniel Kiper
2022-05-20 14:33       ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1711366171.63066.1652993574862.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=daniel.kiper@oracle.com \
    --cc=dkiper@net-space.pl \
    --cc=grub-devel@gnu.org \
    --cc=phcoder@gmail.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=rharwood@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.