From xemacs-m  Mon Mar 24 12:27:42 1997
Received: from elc1.dina.kvl.dk (elc1.dina.kvl.dk [130.225.40.228])
	by xemacs.org (8.8.5/8.8.5) with SMTP id MAA15521
	for <xemacs-beta@xemacs.org>; Mon, 24 Mar 1997 12:27:41 -0600 (CST)
Received: from zuse.dina.kvl.dk (zuse.dina.kvl.dk [130.225.40.245]) by elc1.dina.kvl.dk (8.6.12/8.6.4) with ESMTP id TAA01530; Mon, 24 Mar 1997 19:16:34 +0100
Received: (abraham@localhost) by zuse.dina.kvl.dk (8.6.12/8.6.4) id TAA17981; Mon, 24 Mar 1997 19:25:38 +0100
Sender: abraham@dina.kvl.dk
To: xemacs-beta@xemacs.org
Subject: Re: Customize faces slow (known problem?) (b101)
References: <by3etq4vk9.fsf@math.ethz.ch> <QQchuk13982.199703210730@crystal.WonderWorks.COM>
Organization: The Church of Emacs
X-Face: +kRV2]2q}lixHkE{U)mY#+6]{AH=yN~S9@IFiOa@X6?GM<U{B+4e{k79.Ya{~':DblFPCg$
 @60,BfLv2@SKZ19cMWK0/C'v;tM:|6B'R}U1rp6CL&kN({9<zF/V{:JCg27yC)9oZjeqcQawzKfiNL
 t9}`vjmK["dRQC/qGFQq"%u|Q`:6{"Rz}b(dnl_"3$Jtqimi>|8MBp/
From: Per Abrahamsen <abraham@dina.kvl.dk>
Date: 24 Mar 1997 19:25:38 +0100
In-Reply-To: Kyle Jones's message of Fri, 21 Mar 1997 02:30:26 -0500 (EST)
Message-ID: <rj4te1qh99.fsf@zuse.dina.kvl.dk>
Lines: 38
X-Mailer: Gnus v5.4.26/Emacs 19.34
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Kyle Jones <kyle_jones@wonderworks.com> writes:

> I profiled the startup of customize-face and the top three Lisp
> functions were
> 
> widget-get                                               556   17.696
> add-text-properties                                      440   14.004
> widget-default-create                                    405   12.890
> 
> accounting for 43% of the time.
> 
> start-profiling, stop-profiling and pretty-print-profiling-info
> are the functions to use if you want to do it yourself.

Thanks.  I get very different values, `widget-default-create' and
`replace-match' are always in top, like this:

Function                                               Count        %
---------------------------------------------------------------------
widget-default-create                                    567   36.938
replace-match                                            491   31.987
widget-get                                               126    8.208
widget-default-delete                                     99    6.450
add-text-properties                                       76    4.951
match-string                                              49    3.192

Strange.  But at least, it is clear what should be optimized here!

The code is:

(progn 
  (clear-profiling-info)
  (start-profiling)
  (customize-face)
  ; (customize-face 'custom-group-tag-face)
  (stop-profiling)
  (with-output-to-temp-buffer "*Foo*"
    (pretty-print-profiling-info)))

