Subject: performance bugfix in Pine 3.91

From: Mark Crispin <[email-masked]>
Date: Tue, 22 Nov 1994 00:28:13 -0800

Some people have complained about poor performance in opening mbox-format
mail files in Pine 3.91.  The patch below to pine/imap/c-client/bezerk.c
fixes the problem.  I'm not sure why it should make a difference, but it
does.

This bugfix will be in Pine 3.92.

*** bezerk.c.OLD	Fri Oct 21 03:41:03 1994
--- bezerk.c	Mon Nov 21 23:18:07 1994
***************
*** 1554,1567 ****
        i = (sod + i) - s;	/* total number of tries */
        do {			/* fast search for newline */
  	if ((0x80808080 & (0x01010101 + (0x7f7f7f7f & ~(m ^ *(Word *) s)))) &&
! 	    (s1 = ((s[3] == '\n') ? (s + 4) :
! 		   ((s[2] == '\n') ? (s + 3) :
! 		    ((s[1] == '\n') ? (s + 2) :
! 		     ((s[0] == '\n') ? (s + 1) : NIL)))))) {
! 	  VALID (s1,t,ti,zn);	/* interesting word, check it closer */
  	  if (ti) return s1;
  	}
! 	else s += 4;		/* try next word */
  	i -= 4;			/* count a word checked */
        } while (i > 24);		/* continue until end of plausible string */
      }
--- 1554,1567 ----
        i = (sod + i) - s;	/* total number of tries */
        do {			/* fast search for newline */
  	if ((0x80808080 & (0x01010101 + (0x7f7f7f7f & ~(m ^ *(Word *) s)))) &&
! 				/* find rightmost newline in word */
! 	    ((*(s1 = s + 3) == '\n') || (*--s1 == '\n') ||
! 	     (*--s1 == '\n') || (*--s1 == '\n'))) {
! 	  s1++;			/* skip past newline */
! 	  VALID (s1,t,ti,zn);	/* see if valid From line */
  	  if (ti) return s1;
  	}
! 	s += 4;			/* try next word */
  	i -= 4;			/* count a word checked */
        } while (i > 24);		/* continue until end of plausible string */
      }

---

From: [email-masked] (Liam Crilly)
Date: Tue, 22 Nov 1994 12:36:17 GMT

Mark Crispin wrote:
» Some people have complained about poor performance in opening mbox-format
» mail files in Pine 3.91.  The patch below to pine/imap/c-client/bezerk.c
» fixes the problem.  I'm not sure why it should make a difference, but it
» does.

» This bugfix will be in Pine 3.92.
[code diffs]

Is there an easy way to integrate this patch
into the original distribution source code?

Thanks,

	Liam.

--
8"88"""8P"48"V"8                Liam Crilly                  
8 "88 88 " 8   8             [email-masked]              8 "88 88 " 8   8
8oo8ooo8o8o8oYo8            [email-masked]             8oo8ooo8o8o8oYo8
++ SPEC representative, Performance Benchmarking Unit, ICL, Bracknell, UK. ++