GNU bug report logs - #15740
24.3.50; enabling & disabling custom themes is slow

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Drew Adams <drew.adams@HIDDEN>; dated Sun, 27 Oct 2013 21:09:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 15740 <at> debbugs.gnu.org:


Received: (at 15740) by debbugs.gnu.org; 28 Oct 2013 03:09:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 23:09:04 2013
Received: from localhost ([127.0.0.1]:47986 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VadCR-0007Rw-2V
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2013 23:09:03 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:44928)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1VadCM-0007RP-WC
 for 15740 <at> debbugs.gnu.org; Sun, 27 Oct 2013 23:09:00 -0400
Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237])
 by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id
 r9S38qRU019590
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Mon, 28 Oct 2013 03:08:53 GMT
Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230])
 by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9S38pPb017386
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Mon, 28 Oct 2013 03:08:51 GMT
Received: from abhmt115.oracle.com (abhmt115.oracle.com [141.146.116.67])
 by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9S38peN017381;
 Mon, 28 Oct 2013 03:08:51 GMT
MIME-Version: 1.0
Message-ID: <571c27f7-73bb-4b51-b656-ee81c0d893d0@default>
Date: Sun, 27 Oct 2013 20:08:50 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Leo Liu <sdl.web@HIDDEN>
Subject: RE: bug#15740: 24.3.50; enabling & disabling custom themes is slow
References: <ff7383ec-3002-49ec-abbb-c1e979d55cd5@default>
 <m1zjpuqiwr.fsf@HIDDEN>
In-Reply-To: <m1zjpuqiwr.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6680.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: acsinet21.oracle.com [141.146.126.237]
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 15740
Cc: 15740 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.8 (--)

> > Not so, custom themes - disabling all enabled themes
> > and then enabling one theme is painfully slow, and you see all of
> > the changes manifested on the screen, slowly.  The same is true if
> > there is only one theme enabled: disabling it and enabling another
> > is very slow.
> >
> > Is this something that could be fixed?
>=20
> But it works splendidly on OS X and GNU/Linux.

Are you sure?  I somehow doubt it.  Have you tried changing themes
when you have multiple frames, say 6 or 10 frames?  Try it.

> Do you have a recipe to see the slowness?

Sure.  `emacs -Q'.  Then load `doremi.el' and `doremi-cmd.el'.  Then use
`M-x doremi-custom-themes+' to cycle among themes.

With the default value of option `doremi-custom-themes-accumulate-flag',
previously enabled themes are disabled when you enable the next one.
But even in that case it is very slow.

If you let the themes accumulate while cycling (toggle that option),
then things get slower and slower and SLOWER, very quickly.  (Makes
sense: you are accumulating more stuff and disabling more stuff.)
I don't really expect cycling with accumulation to be a usable use case
(hence the default value of the option), but someone might want to use
it occasionally to merge a few themes.

And what I described is the case if you have only ONE frame.  If you
have multiple frames then it is much, much slower still.

Compared to what?  Compared to color themes.  The same library
`doremi-cmd.el' gives you command `doremi-color-themes+', for comparison.

Doesn't matter how many frames you have: replacing one *color* theme by
another appears to be instantaneous, and with no flickering (such as you
see with custom themes, where disabling runs through each frame,
redisplaying it, and then the subsequent enabling runs through each
frame again, redisplaying it).

Very simple to compare.  You will need library `color-theme.el',
available here: http://www.nongnu.org/color-theme.

The Do Re Mi files are available on Emacs Wiki:
http://www.emacswiki.org/emacs-en/download/doremi.el
http://www.emacswiki.org/emacs-en/download/doremi-cmd.el

If you want to cycle among themes using some other way than Do Re Mi,
feel free.  You'll see the same thing, I expect.
=20
> > A custom theme is, I believe, heavier duty, saving more
> > information than a color theme.  A color theme records frame
> > parameters, faces, and some variables - no more.
> >
> > Does this difference in the amount of information account for the
> > difference in performance?  Dunno.  Hoping someone will take a
> > look...
>=20
> Many years ago when I tried color-theme it couldn't be cleanly
> disabled and at times leave some faces in an unusable state that
> only a restart could fix.

What can I say?  Maybe you should try it again, without whatever
else you might have mixed into the bag at the time.

I have never had such a problem with it, including with Emacs 24.

And unlike custom themes, it is trivial to undo most of the effects
of a color theme, i.e., to return to whatever settings you had in
place before applying any theme.

That is apparently not possible with a custom theme - see bug #15687.
All you can do is "disable" a custom theme, which leaves you,
appearance-wise, in the same (_apparently_ themed) state.  OK,
disabling does restore `default-frame-alist` and such, but it does
not update the existing frames to restore their previous appearance.

And it is not just a redisplay thing.  If you have file foo.el in a
frame that has undergone this operation, and you want to see foo.el
in a frame that has the original settings, before you enabled and
disabled a custom theme, then you have to use `C-x 5 2' to open foo.el
in a new frame.  The existing frames are cooked, once and for all.
"Disabling" is only relative to other themes.  It is a far cry from
undoing a theme.

Don't get me wrong.  Custom themes have their strong points - they
have a relatively good Customize interface, and they include more
information than color themes do.  If the bugs get fixed then people
will perhaps rightfully be able to kiss `color-theme.el' goodbye.
Until then, custom themes are unfortunately no substitute for color
themes.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15740; Package emacs. Full text available.

Message received at 15740 <at> debbugs.gnu.org:


Received: (at 15740) by debbugs.gnu.org; 28 Oct 2013 01:33:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 21:33:10 2013
Received: from localhost ([127.0.0.1]:47947 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Vabhe-0003xh-EA
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2013 21:33:10 -0400
Received: from mail-pa0-f47.google.com ([209.85.220.47]:61824)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <sdl.web@HIDDEN>) id 1Vabhb-0003xO-Tm
 for 15740 <at> debbugs.gnu.org; Sun, 27 Oct 2013 21:33:08 -0400
Received: by mail-pa0-f47.google.com with SMTP id lf10so6390332pab.20
 for <15740 <at> debbugs.gnu.org>; Sun, 27 Oct 2013 18:33:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:references:face:date:in-reply-to:message-id
 :user-agent:mime-version:content-type;
 bh=VKisShIobKCyOWUB7STgWKp/8oLw5Sn5h4uLA6TFuYw=;
 b=jkO7cItWu+81elXK1CBoxDzNwVSwXEI35In++q7SgEJpqXvy6AMLC8CwP8alX0i2NW
 /URcqHFxV+XHUQQOoRPJC5JrM07QdFs0unk1hKwIEwgERuybkEN8y0nMS0J5cVjPdHef
 rMGKkyecmKk9Qc5jw9gTW+dipdktaK1YA46OnMrGVX2rG+HfWCKto/OE7IPiaQJn/EJ2
 eqTlWWt9NqNmIhRIJgB7kxSQXr4LE3xDNN05GWiO/WDRd0/3rmu24juJfIlcXX4JSDk7
 zRxeq7vm/l3HS3vwX4e8/EN6Uwz1GI+WhgR94w90LrB9F0HAxp/fCy6qYeX3wylpW6h/
 On3Q==
X-Received: by 10.68.253.67 with SMTP id zy3mr557712pbc.137.1382923982037;
 Sun, 27 Oct 2013 18:33:02 -0700 (PDT)
Received: from localhost ([114.248.253.219])
 by mx.google.com with ESMTPSA id y9sm30805854pas.10.2013.10.27.18.32.59
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 27 Oct 2013 18:33:01 -0700 (PDT)
From: Leo Liu <sdl.web@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#15740: 24.3.50; enabling & disabling custom themes is slow
References: <ff7383ec-3002-49ec-abbb-c1e979d55cd5@default>
Face: iVBORw0KGgoAAAANSUhEUgAAACkAAAApAQAAAACAGz1bAAABKElEQVQYlWNg3NIt5FDPUPt7
 4+X79Qyucz5/ugik+L2PBgKpyphaIK921q23QDnG0NBQoMr/vaWl9f8ZLL78uPv5PwN7RETfzXoG
 jhmFz27XM0RXmpuY/WfY+fv0Mc56BvFybfXA/wwL5t/wF61n2PU59axXPcOVzbmSW/8zrNt1benC
 /ww70hqUU/4zKCtrT9jwn8FhwynbufUMendE2aLqGRpdX9al1zM8eh17lKeeQcTMrdD5P8P3j/YT
 Q/8zXHSb7p1Qz/C4OM2JuZ7hgtI7K6AjqsMnf8j4z8C6xG1tw3+GqpqvsVn/GTzmpD9j/8/wP/oZ
 S/l/Bka+QO/g/wy15ueeFQL9N1O8mPU/g+umV3t1gdT0/1bTgHLqYVeXAlWKpMWt+w8Az82C9nHf
 X0cAAAAASUVORK5CYII=
Date: Mon, 28 Oct 2013 09:32:52 +0800
In-Reply-To: <ff7383ec-3002-49ec-abbb-c1e979d55cd5@default> (Drew Adams's
 message of "Sun, 27 Oct 2013 14:07:30 -0700 (PDT)")
Message-ID: <m1zjpuqiwr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15740
Cc: 15740 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On 2013-10-28 05:07 +0800, Drew Adams wrote:
> Not so, custom themes - disabling all enabled themes
> and then enabling one theme is painfully slow, and you see all of the
> changes manifested on the screen, slowly.  The same is true if there is
> only one theme enabled: disabling it and enabling another is very slow.
>
> Is this something that could be fixed?

But it works splendidly on OS X and GNU/Linux. Do you have a recipe to
see the slowness?

> A custom theme is, I believe, heavier duty, saving more information than
> a color theme.  A color theme records frame parameters, faces, and some
> variables - no more.
>
> Does this difference in the amount of information account for the
> difference in performance?  Dunno.  Hoping someone will take a look...

Many years ago when I tried color-theme it couldn't be cleanly disabled
and at times leave some faces in an unusable state that only a restart
could fix.

Leo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15740; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Oct 2013 21:08:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 17:08:03 2013
Received: from localhost ([127.0.0.1]:47776 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VaXZ4-0004dy-HW
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2013 17:08:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40444)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1VaXZ2-0004dS-IW
 for submit <at> debbugs.gnu.org; Sun, 27 Oct 2013 17:08:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VaXYo-0000wW-Om
 for submit <at> debbugs.gnu.org; Sun, 27 Oct 2013 17:07:55 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:48533)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VaXYo-0000wQ-Lr
 for submit <at> debbugs.gnu.org; Sun, 27 Oct 2013 17:07:46 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42136)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VaXYh-0006e4-2X
 for bug-gnu-emacs@HIDDEN; Sun, 27 Oct 2013 17:07:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VaXYZ-0000vJ-JL
 for bug-gnu-emacs@HIDDEN; Sun, 27 Oct 2013 17:07:39 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:24141)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1VaXYZ-0000vF-Cx
 for bug-gnu-emacs@HIDDEN; Sun, 27 Oct 2013 17:07:31 -0400
Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id
 r9RL7Tnh010131
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Sun, 27 Oct 2013 21:07:30 GMT
Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230])
 by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9RL7SMJ006617
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
 for <bug-gnu-emacs@HIDDEN>; Sun, 27 Oct 2013 21:07:29 GMT
Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53])
 by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9RL7SLN006614
 for <bug-gnu-emacs@HIDDEN>; Sun, 27 Oct 2013 21:07:28 GMT
MIME-Version: 1.0
Message-ID: <ff7383ec-3002-49ec-abbb-c1e979d55cd5@default>
Date: Sun, 27 Oct 2013 14:07:30 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3.50; enabling & disabling custom themes is slow
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6680.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: acsinet21.oracle.com [141.146.126.237]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

Custom themes were presumably inspired from the color themes of library
`color-theme.el'.  Color themes are very quick, however, compared to
custom themes.  You can easily cycle among them, instantaneously, with
no flicker etc.  Not so, custom themes - disabling all enabled themes
and then enabling one theme is painfully slow, and you see all of the
changes manifested on the screen, slowly.  The same is true if there is
only one theme enabled: disabling it and enabling another is very slow.

Is this something that could be fixed?

A custom theme is, I believe, heavier duty, saving more information than
a color theme.  A color theme records frame parameters, faces, and some
variables - no more.

Does this difference in the amount of information account for the
difference in performance?  Dunno.  Hoping someone will take a look...

FYI, color-theme.el is here, and it still works fine with Emacs 24:
http://www.nongnu.org/color-theme.

See also bug #15687: cus-theme.el should provide a means to restore the
initial state, before enabling a theme.


In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-10-19 on LEG570
Bzr revision: 114715 rgm@HIDDEN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=3D-O0 -g3' CPPFLAGS=3D-DGLYPH_DEBUG=
=3D1'




Acknowledgement sent to Drew Adams <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#15740; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.