[comp.sys.apple] AWGS Printing

scott@claris.com (Scott Lindsey) (01/07/89)

Let me clear up some misconceptions.

From article <11270007@hpfclm.HP.COM>, by gillam@hpfclm.HP.COM (Larry Gillam):
> 
> 	the word processing module. I became VERY frustrated and finally
> 	got through to Claris(wasn't easy!) Their tech. rep. told me that
> 	that there is a KNOWN bug when using the draft mode. My problems
> 	arose when I tried to print more than one page and using different
> 	fonts. I was told, by Claris, not to use the draft mode. 
Yes, the problem appears to be with the port driver (modem/printer) and the
way DB, WP, & PL print.  To avoid hogging memory when printing in non-draft
mode, these three modules print one page at a time instead of all the pages
in one fell swoop.  Normally, when you print a document, all of the pages
are spooled in memory before being sent to the printer.  That's the way the
print manager works.  As a result of this work-around, the printer is re-
initialized between pages.  In draft mode, this reset is sent asynchronously
by the port-driver to the printer, causing data to be lost near the end of
the page (in some [read most] cases).

> 	had to do with some driver supplied by Apple(?). Claris was working
> 	with Apple to resolve the problem. When, I don't know. 
We're working on it now.

> 	using the draft mode and have had no problems. Although, it's painful
> 	waiting for the "optimized"(?) driver to finish. I'd hate to see
> 	how long it would take to not use the "optimized" driver! 
You can use draft without problem from spreadsheet and otherwise if you limit
yourself to one page per document (yeah, I know, big deal).  The print driver
ImageWriter.CL is NOT, repeat **NOT** optimized.  It merely entails some bug
fixes to Apple's driver.  I know.  I made those fixes.

> 	Another observation....I'm running out of RAM DISK and after an
> 	afternoon of changing from module to module, I found that I wasn't
> 	able to successfully load a previously generated text file(1.5 pages).
> 	When opened, I got the "busy" icon and it never went away. After
> 	5 min. I did a apple-control-reset and came back into the WP module.
> 	Re-opened it and it loaded just fine. Hmmm.....I went into the
> 	Control panel and looked at free RAM and it said 1.46MB. Looked OK, 
> 	but I suspected I had run out of system RAM, so I did some playing 
> 	around and discovered that as I opened and closed windows the RAM 
> 	free was decreasing....never increasing. It appeared that the RAM 
> 	was not being released when a module session was closed! The ONLY 
> 	way I was able to free the RAM was to go the FILE menu and "Quit". 
> 	When the package was re-started the RAM was then available. I don't 
> 	think I should have to go the trouble of "quiting" to be able to free 
> 	enough RAM to load a document! I certainly hope this is fixed in later 
> 	releases. 
>

1) The Total Free RAM in the Control Panel is not a valid indicator of what
is available for a variety of reasons.  Often times memory that is not free
IS purgable (such as a loaded but not open module) and can be made available
if needed though it does not count in "Free" Memory.  AWGS also implements
a handle caching scheme to provide faster allocation of memory than the Memory
Manager would normally provide.  Memory in the cache is purgable but not
"Free".

2) The longer you run a program on the GS which uses the Memory Manager, the
more fragmented memory will become (in general).  Fragmentation describes
the situation where (relatively) small chunks of free memory occur between
allocated, immovable chunks of memory.  E.g., suppose you have allocated
memory, 1K free, allocated memory, 1K free, and allocated memory. [This is
a simplified example].

| Mem | 1K | Mem | 1K | Mem |

If you need 2K, you can't get it, even though there's 2K free.  The largest
contiguous chunk of memory available is 1K.

Memory is not being eaten... we checked this very carefully.  It's just getting
fragmented.  The only way to avoid this is to periodically flush memory as
you described, or get more memory.  AWGS really pushes the IIgs to some of its
limits, generally running at a relatively large Used:Free memory ratio.

Hope this makes things a little more understandable.

 
-- 
Scott Lindsey, wombat    | UUCP: {ames,apple,portal,sun,voder}!claris!scott
Product Development      | Internet:  scott@claris.com  |  AppleLink: LINDSEY1
Claris Corp.             | Disclaimer: These are not the opinions of Claris,
(415) 960-4070           | Apple, the author, or anyone else living or dead.

mcgurrin@MITRE.ARPA (01/14/89)

Thanks for the reply to the AWGS questions Scott.  Maybe you can answer one 
other question:  Why does AWGS reinitialize the printer to draft mode when
printing in draft, rather than letting it stay the way the user has configured
it using the hardware switch?  This would seem to be a good way to get fast but decent output of plain text.