[Bug: 21.5-b25] XEmacs 21.5 doesn't like Python
tbennett at nvidia.com
tbennett at nvidia.com
Tue Mar 21 10:46:08 EST 2006
"skip at pobox.comFCC":~/Mail/archive/2006-03 at gwyn.tux.org writes:
> I do a lot of ad hoc filtering of HTML files using shell pipelines. I test
> those pipelines in XEmacs using shell-command-on-region. With 21.5 I notice
> this process has become abysmally slow. I've whittled the problem down as
> much as I can. If I visit /usr/share/file/magic (~ 360Kbytes on my Mac) and
> execute
>
> C-x h M-| cat RET
>
> the command executes nearly instantaneously, as you'd expect. If, on the
> hand, I execute this little Python script instead of cat:
>
> import sys
>
> for line in sys.stdin:
> sys.stdout.write(line)
> ...
> the command takes what seems like forever to execute. I just measured it at
> about 19 seconds on my Mac PowerBook. I get the same result whether I use
> Python 2.3, 2.4 or Python built from the latest CVS source.
Maybe the following patch will help you. It makes running
subprocesses (eg: man) much faster for me. This patch was in
XEmacs 21.5 somewhere around 21.5.19 I think, but was reverted a
few versions back for some reason.
*** src/process-unix.c~ Sat Mar 1 02:25:36 2003
--- src/process-unix.c Mon Jul 12 22:00:37 2004
***************
*** 1530,1536 ****
/* Buffer is full. Wait, accepting input;
that may allow the program
to finish doing output and read more. */
! Faccept_process_output (Qnil, make_int (1), Qnil);
/* It could have *really* finished, deleting the process */
if (NILP(p->pipe_outstream))
return;
--- 1530,1537 ----
/* Buffer is full. Wait, accepting input;
that may allow the program
to finish doing output and read more. */
! // Faccept_process_output (Qnil, make_int (1), Qnil);
! Faccept_process_output (Qnil, Qnil, make_int (10));
/* It could have *really* finished, deleting the process */
if (NILP(p->pipe_outstream))
return;
--
--tony
More information about the XEmacs-Beta
mailing list