Path: utzoo!utgpu!watmath!clyde!att!rutgers!aramis.rutgers.edu!geneva.rutgers.edu!hedrick
From: hedrick@geneva.rutgers.edu (Charles Hedrick)
Newsgroups: comp.windows.news
Subject: Improving NeWS performance on SunOS 4.0
Message-ID: 
Date: 3 Dec 88 03:38:38 GMT
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 29

For some odd reason I like NeWS.  Unfortunately, I am using a Sun
3/50, which has only 4MB of memory.  NeWS (and probably also other
window systems) are marginal with 4MB.  I found that whenever I moved
between windows, things paused for a few seconds while the program
behind the new window got paged in.  This was quite annoying.  I'm
managed to improve things markedly by rebuilding the NeWS software
from source under 4.0.  I assume this is because the sharable library
saves memory.  It may not save that much, but NeWS is right at a point
where a relatively small saving matters a lot.  That big change
occured simply by rebuilding from source.  (In the 1.1 source, you'll
find you need to use -DFOURPOINT0 in order to get a few things to
compile under 4.0.)  In an attempt to save a bit more space, I also
removed support for X10 (it never was very useful, and we're using
X11).  (Do this by redefining the symbols XSRC, XOBJ, and XHDRS, etc.
to be null, and comment out the stuff about X in
.../lib/NeWS/demomenu.ps.)  Finally, I put "0 setretainthreshold" in
my user.ps, on the theory that retained windows requires more memory,
and I'm willing to use more CPU to save memory.  Simplying recompiling
under 4.0 made a difference.  It's not clear that the other two things
did.  With my new version, it's possible to go back and forth between
Emacs and psterm windows without swapping.  The working set size seems
to have gone from about 1.2M to 1M, but from its behavior with other
programs, it appears that the RSS column under 4.0 includes the shared
libraries, so the effective change is in fact slightly larger.  Again,
on an 8MB machine this change probably wouldn't be noticable, but on a
3/50 it is quite significant.  (I also do various things to tune
psterm, but I think I've mentioned that before.  In particular, if you
type quickly I strongly recommend that you turn off the "fast repaint"
feature.)