Debian Bug report logs - #477083
grub-pc: Is excruciatingly slow when compared to grub (legacy)

version graph

Package: grub-pc; Maintainer for grub-pc is GRUB Maintainers <[email protected]>; Source for grub-pc is src:grub2 (PTS, buildd, popcon).

Reported by: Frans Pop <[email protected]>

Date: Sun, 20 Apr 2008 20:39:01 UTC

Severity: important

Tags: fixed-upstream

Merged with 476479, 486119

Found in versions 1.96+20080621-1, grub2/1.96+20080413-1, grub2/1.96+20080601-2, grub2/1.96+20080626-1

Fixed in versions 1.96+20080617-1, grub2/1.96+20080704-1

Done: Robert Millan <[email protected]>

Bug is archived. No further changes may be made.

Full log


Message #15 received at [email protected] (full text, mbox, reply):

Received: (at 477083) by bugs.debian.org; 24 Apr 2008 07:39:30 +0000
From [email protected] Thu Apr 24 07:39:29 2008
X-Spam-Checker-Version: SpamAssassin 3.1.4-bugs.debian.org_2005_01_02 
	(2006-07-26) on rietz.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-9.9 required=4.0 tests=BAYES_00,FOURLA,
	HAS_BUG_NUMBER,X_DEBBUGS_NO_ACK autolearn=no 
	version=3.1.4-bugs.debian.org_2005_01_02
Return-path: <[email protected]>
Received: from aybabtu.com ([69.60.117.155])
	by rietz.debian.org with esmtp (Exim 4.63)
	(envelope-from <[email protected]>)
	id 1Jovtx-0006oN-0g
	for [email protected]; Thu, 24 Apr 2008 07:29:53 +0000
Received: from [192.168.10.6] (helo=thorin)
	by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.63)
	(envelope-from <[email protected]>)
	id 1Jovtl-0000Ih-6H; Thu, 24 Apr 2008 09:29:41 +0200
Received: from rmh by thorin with local (Exim 4.63)
	(envelope-from <[email protected]>)
	id 1JovsJ-0007Mo-9r; Thu, 24 Apr 2008 09:28:11 +0200
Date: Thu, 24 Apr 2008 09:28:11 +0200
From: Robert Millan <[email protected]>
To: Frans Pop <[email protected]>, [email protected]
Subject: Re: Bug#477083: grub-pc: Is excruciatingly slow when compared to grub (legacy)
Message-ID: <20080424072811.GA5572@thorin>
References: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[email protected]>
Organization: free as in freedom
X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird
X-Debbugs-No-Ack: true
User-Agent: Mutt/1.5.13 (2006-08-11)
On Sun, Apr 20, 2008 at 10:35:35PM +0200, Frans Pop wrote:
> 
> I have tried grub-pc a few times during my installation tests and
> noticed that it is really significantly slower than grub "legacy".
> This may or may not be very visible on real hardware, but in Virtualbox
> (running on a fast, modern host system) the difference is 30 seconds.
> 
> With grub I am looking at the grub menu 4 seconds after I start the
> virtual machine (which includes ~2 seconds of allowing to select a
> different boot medium by the VM's "bios").
> With grub-pc this is 34 (!) seconds.
> 
> You can clearly see the different stages too, even of the menu being
> built up (numbers are seconds:
>  0- 3: start virtual machine and BIOS stuff
>  3   : "Welcome to GRUB!" is displayed
>  3-28: occasional disk activity, but display remains the same
> 28   : "GNU GRUB  version 1.96" is displayed
> 30-32: slooowly the border is built up from top to bottom and the help
>        text below is displayed
> 32-33: no visible action
> 33-34: menu items are shown and the blue background is filled in

That's strange.  In my laptop it just takes ~2 seconds from MBR load up
untill menu is displayed.

What are the constraints in your test environment?  I assume CPU will be
ultra-slow but disk access (through BIOS) relatively fast?

> Note that there's also #476479 ("takes 10 seconds to get to the menu")
> which is currently assigned to grub-common. I'm willing to bet that report
> is about grub-pc too, and not about grub "legacy".

Now that I check, the "Welcome to GRUB!" string is actually GRUB2-specific.
I'm reassigning that one...

> Also, scrolling through the menu is quite slow and there's "flashing" of
> the (previously highlighted) menu item line while scrolling. This is
> different from the flashing mentioned in #437275.

Ah, I see what you mean.  It's erasing the whole line and then drawing it
again, right?

> With grub "legacy", the menu appears almost instantaneously and the
> scrolling is fast and smooth.

Well, notice there's a handicap of sorts.  The code for drawing in text mode
is a BIOS callback and hasn't changed much (you can try it by setting
GRUB_TERMINAL=console in /etc/default/grub and re-run update-grub), but
the gfxterm/vbe stack is (forcibly) more expensive.  There's probably room
for optimization though.

-- 
Robert Millan

"The technological evasion of the license is as unacceptable as the
 legal evasion of the license [...].  That's the provision in section
 1 regarding keys. [...]  We say one thing: when you sell somebody a
 home... give him the keys"  -- Eben Moglen on GPLv3




Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 17:50:30 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.