[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#570447: Acknowledgement (x11-common: Optimize speed of Xsession.d scripts)



Hi,

I'm probably looking at this a bit late, but...

On Fri, Feb 19, 2010 at 06:45:58 +0100, Martin Pitt wrote:

> diff -Nru xorg-7.5+1ubuntu2/debian/changelog xorg-7.5+1ubuntu3/debian/changelog
> --- xorg-7.5+1ubuntu2/debian/changelog	2010-01-26 00:38:13.000000000 +0100
> +++ xorg-7.5+1ubuntu3/debian/changelog	2010-02-18 23:14:11.000000000 +0100
> @@ -1,3 +1,18 @@
> +xorg (1:7.5+1ubuntu3) lucid; urgency=low
> +
> +  * Improve startup speed of Xsession.d scripts by eliminating all unnecessary
> +    external program calls:
> +    - In 20x11-common_process-args, cat $OPTIONFILE once into a variable and
> +      use POSIX variable substitution in all scripts instead of calling grep
> +      for every single test.

This looks like a good idea.

> +    - Use shell built in "type" instead of external "which" to test for
> +      programs.

There's no guarantee that /bin/sh has a 'type' built-in, as far as I can
tell from SUSv3 and policy).  I'd suggest command -v, but apparently
posh doesn't like that either, so I don't know.

> +    - 30x11-common_xresources: Swap the order of tests to keep the most
> +      unlikely (like "~/.Xresources exists") outside, to avoid running the
> +      other tests (like "xrdb exists") on systems which don't use Xresources.
> +

I'm not sure about this one.  x11-common installs a file in
/etc/X11/Xresources, so you'll end up looking for xrdb on pretty much
every system regardless.  And then the reordering means you're looking
for it twice (granted, with 'type' the shell can cache the result of the
first lookup, but still).

Cheers,
Julien

Attachment: signature.asc
Description: Digital signature


Reply to: