emacs-devel
[Top][All Lists]
Advanced

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

Re: Q on performance with 10000 faces


From: Stefan Monnier
Subject: Re: Q on performance with 10000 faces
Date: Tue, 23 May 2006 17:06:40 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]