mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: musl build times
Date: Thu, 12 Jul 2012 13:11:00 -0400	[thread overview]
Message-ID: <20120712171100.GE544@brightrain.aerifal.cx> (raw)
In-Reply-To: <42355.50.0.229.11.1342111667.squirrel@lavabit.com>

On Thu, Jul 12, 2012 at 12:47:47PM -0400, idunham@lavabit.com wrote:
> > On Thu, Jul 12, 2012 at 06:41:09AM -0700, idunham@lavabit.com wrote:
> >> I was just playing around, and discovered that redirecting to a file
> >> shaves 1 minute, 5 seconds (3:36 vs 2:31) off the build time here (Atom
> >> N270 @1.6 GHz; 5400 RPM SATA HDD in legacy mode, ext2; 1 GB DDR2; gcc
> >
> > You mean directing output to a file versus to a terminal? If so, which
> > terminal are you using? That's probably very relevant...
> Probably so...
> kernel VT with i915 + fbcon.

That's the problem.

> Now that I think back, I think real textmode was significantly faster.
> By the way, this is the same reason "quiet" speeds up boot (my testing
> showed ~ 2-3 seconds difference in kernel boot, out of ~8 seconds without
> quiet...)
> I've noticed similar effects with Xterm & urxvt, though ISTR that urxvt
> can be sped up with asynchronous text output (I forget the option,
> though).

Most/all of these terminals have a fundamental design flaw: when they
receive text from the application, after applying the changes to their
internal representation of the terminal contents, they immediately,
synchronously, update the visual presentation on-screen, delaying
processing of any further input and allowing it to back up. This is
pathologically inefficient, and didn't matter so much for traditional
vga textmode terminals, but the inefficiency becomes very noticable on
fbcon and X-based terminals.

[Shameless plug starts here:] The only terminal I know of without this
design issue is uuterm. In its main select loop, it processes input
and applies it to its internal terminal representation as long as
input is available. Only when no further input is available (as
determined by select), or when a long interval of time has passed with
no break in the input stream, is the internal representation applied
to the screen contents. Even with a fairly expensive text rendering
system that accounts for unicode combining characters and glyph
substitution, it's still many times faster than the Linux console and
most X-based terminal apps just because it doesn't perform repetitive
video updates only to overwrite them immediately with new updates.

Rich


      reply	other threads:[~2012-07-12 17:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 13:41 idunham
2012-07-12 14:05 ` Rich Felker
2012-07-12 14:30   ` Kurt H Maier
2012-07-12 16:47   ` idunham
2012-07-12 17:11     ` Rich Felker [this message]

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=20120712171100.GE544@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).