From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Q on performance with 10000 faces Date: Tue, 23 May 2006 17:06:40 -0400 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1148418446 22113 80.91.229.2 (23 May 2006 21:07:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 May 2006 21:07:26 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 23 23:07:24 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fie5u-0002hW-NT for ged-emacs-devel@m.gmane.org; Tue, 23 May 2006 23:07:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fie5u-00006H-7l for ged-emacs-devel@m.gmane.org; Tue, 23 May 2006 17:07:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fie5f-000064-An for emacs-devel@gnu.org; Tue, 23 May 2006 17:06:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fie5c-00005O-H4 for emacs-devel@gnu.org; Tue, 23 May 2006 17:06:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fie5c-00005C-8Z for emacs-devel@gnu.org; Tue, 23 May 2006 17:06:52 -0400 Original-Received: from [209.226.175.93] (helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fie9q-0002cz-MH; Tue, 23 May 2006 17:11:16 -0400 Original-Received: from localhost ([70.55.144.35]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060523210640.HIMU13653.tomts36-srv.bellnexxia.net@localhost>; Tue, 23 May 2006 17:06:40 -0400 Original-Received: by localhost (Postfix, from userid 20848) id 603A78258; Tue, 23 May 2006 17:06:40 -0400 (EDT) Original-To: Eli Zaretskii In-Reply-To: (Eli Zaretskii's message of "Tue, 23 May 2006 22:00:04 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:55157 Archived-At: >> I use the patch below (under GNU/Linux) to provide a `moncontrol' elisp file >> that allows me to start/stop C profiling so I can start it once I get into >> a "strangely slow" state. > I think this is a good idea, and it will work on MS-Windows as well, > at least in the MinGW build. > Richard, is it okay for Stefan to install the patch below? I don't > see how can it possibly do any harm. I'd be a bit nervous to add a reference to a function `moncontrol' just like that. I did it as a quick hack at a time I needed it. But if it's conditionalized on PROFILING, maybe it's OK. Stefan >> --- orig/src/emacs.c >> +++ mod/src/emacs.c >> @@ -1769,7 +1777,7 @@ >> defined on all systems now. */ >> monstartup (safe_bcopy, &etext); >> } >> - else >> + /* else */ >> moncontrol (0); >> #endif >> #endif >> @@ -1791,6 +1799,14 @@ >> return 0; >> } >> >> +DEFUN ("moncontrol", Fmoncontrol, Smoncontrol, 1, 1, 0, >> + /* doc: toggle profiling. */) >> + (arg) >> + Lisp_Object arg; >> +{ >> + return moncontrol (!NILP (arg)) ? Qt : Qnil; >> +} >> + >> /* Sort the args so we can find the most important ones >> at the beginning of argv. */ >> >> @@ -2450,6 +2466,7 @@ >> >> defsubr (&Sinvocation_name); >> defsubr (&Sinvocation_directory); >> + defsubr (&Smoncontrol); >> >> DEFVAR_LISP ("command-line-args", &Vcommand_line_args, >> doc: /* Args passed by shell to Emacs, as a list of strings.