🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98342

Performance problems on VAX 8800 (SysV)

#98342
From: Paul Hart
Date: Mon, 19 Aug 1991 15:34
104 lines
3903 bytes
Using

GNU Emacs 18.57 on a VAX 8800 running System V Release 3.2

Long ago when I installed GNU Emacs on our machines I have to make changes
in the file process.c (part of included below).  The reason for the changes
was that GNU Emacs would hang for several seconds (as long as 1.5 minutes) and
then return to normal.  It was as if GNU Emacs just quit processing, because
after the pause every thing worked normally.

I dug through the source and found a place where it would seem the problem
orginated.  The variable timeout.tv_sec was set to 100 seconds (line #1576)
I set this variable to 1 second.

Current Story:  I noticed that GNU Emacs is eating up a HUGE amount of CPU
time 15:30 minutes in just 3 hours (my process alone).  This was just doing
basic editing and Gnus'ing (no compiles).

Can anyone offer suggestions on why I am having the pause problem? 

Included below in the second of source from process.c where I made the change.

---process.c---
      /* If status of something has changed, and no input is available,
	 notify the user of the change right away */
      if (update_tick != process_tick && do_display)
	{
	  Atemp = input_wait_mask;
#ifdef HAVE_TIMEVAL
	  timeout.tv_sec=0; timeout.tv_usec=0;
#else /* not HAVE_TIMEVAL */
	  timeout = 0;
#endif /* not HAVE_TIMEVAL */
	  if (select (MAXDESC, &Atemp, 0, 0, &timeout) <= 0)
	    status_notify ();
	}

      /* Don't wait for output from a non-running process.  */
      if (wait_proc != 0 && !NULL (wait_proc->raw_status_low))
	update_status (wait_proc);
      if (wait_proc != 0
	  && ! EQ (wait_proc->status, Qrun))
	break;

      if (fix_screen_hook)
	(*fix_screen_hook) ();

      /* Compute time from now till when time limit is up */
      /* Exit if already run out */
      if (time_limit == -1)
	{
	  /* -1 specified for timeout means
	     gobble output available now
	     but don't wait at all. */
#ifdef HAVE_TIMEVAL
	  timeout.tv_sec = 0;
	  timeout.tv_usec = 0;
#else
	  timeout = 0;
#endif /* not HAVE_TIMEVAL */
	}
      else if (time_limit)
	{
#ifdef HAVE_TIMEVAL
	  gettimeofday (&timeout, &garbage);
	  timeout.tv_sec = end_time.tv_sec - timeout.tv_sec;
	  timeout.tv_usec = end_time.tv_usec - timeout.tv_usec;
	  if (timeout.tv_usec < 0)
	    timeout.tv_usec += 1000000,
	    timeout.tv_sec--;
	  if (timeout.tv_sec < 0)
	    break;
#else /* not HAVE_TIMEVAL */
          time (&temp);
	  timeout = end_time - temp;
	  if (timeout < 0)
	    break;
#endif /* not HAVE_TIMEVAL */
	}
      else
	{
#ifdef HAVE_TIMEVAL
	  /* If no real timeout, loop sleeping with a big timeout
	     so that input interrupt can wake us up by zeroing it  */
	  timeout.tv_sec = 100;
>> change was made here, from 100 to 1
>>
	  timeout.tv_usec = 0;
#else /* not HAVE_TIMEVAL */
          timeout = 100000;	/* 100000 recognized by the select emulator */
#endif /* not HAVE_TIMEVAL */
	}
--
(setf 'Disclaimer  t)
(setf 'Name        "Paul Hart")
(setf 'Company     "Bell Communications Research")
(setf 'P-Address   "33 Knightsbridge Road, Piscataway, NJ 08855-1342")
(setf 'E-Address   '("pbh@czar.bellcore.com" "..!bellcore!czar!pbh")
(setf 'Home-phone  "(908) 422-6681")



                        
                 
Technical Details
Message-ID: <PBH.91Aug19113455@czar.bellcore.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!czar.bellcore.com!pbh

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,64cc46e5457c0726,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-08-19 08:34:55 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!czar.bellcore.com!pbh
From: pbh@czar.bellcore.com (Paul Hart)
Newsgroups: gnu.emacs.bug
Subject: Performance problems on VAX 8800 (SysV)
Message-ID: <PBH.91Aug19113455@czar.bellcore.com>
Date: 19 Aug 91 15:34:55 GMT
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: Bellcore - Bell Communications Research
Lines: 104
Approved: bug-gnu-emacs@prep.ai.mit.edu