info-mac@uw-beaver (info-mac) (09/05/84)
From: chavez@harvard.ARPA (R. Martin Chavez) I have written a stdio package that allows Unix-style low-level i/o to a variety of Macintosh "inodes", including windows, bare GrafPorts, and disk files. In particular, I'm using the TextEdit routines to support editing of input text. One creates a window, calls wopen to set up a standard FILE structure bound to that window, and then uses getc/putc in the usual manner. My question is this: after the text reaches a certain size (which I have yet to determine), i/o becomes unacceptably sluggish. The disk spins almost constantly and the TEInsertion of output lines takes forever. I'm using XLISP (recently distributed on net.sources) for testing purposes, and in many cases memory space is at a premium. Does TextEdit engage in disk swapping? Are resources being purged to disk to make room for more text? Can I allocate hText/lineStarts myself to prevent memory thrashing? (It looks to me like TE is allocating just a few bytes in the TERec at a time.) I'd be very grateful for any advice. R. Martin Chavez (chavez@harvard.ARPA)