[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: speed of text applications...
In article <fmlin.2amy@terapin.com> fmlin@terapin.com (Frank M. Lin) writes:
>What does NiftyList use for I/O anyway? It scrolls so FAST! I don't use it (
>don't know how :), but I occationally call it up just to "feel" like a real
>toolbox programmer :P
>
>If enter "???????????????????" or "llllllllllllllllllllll", NiftyList will then
>print them on the screen _really_ quickly, faster anything I know on the GS. I
>notice that GSbug scrolls fast too ( gsbug is another "real programmers tool"
>which I don't use :). Why? Is it because interrupts are disabled when you're
>in CDA and/or GSbug? Other CDA don't scroll anywhere near the speed of NL or
>GSbug.
Interrupts are enabled while you're in GSBug or Nifty List; they both have
their own routines to blast directly into screen memory.
GSBug *has* to do that, since you can be using GSBug to trace through the
Text Tools, or the Console Driver, or whatever, one line at a time. GSBug
has to be pretty careful about how it calls the toolbox or OS.
Nifty List used to use the Text Tools (still does *when* you redirect output
to a slot). It didn't crawl, but it was slow enough to be a little annoying.
I kept claiming I'd speed it up some day, and I kept not doing it.
Then one Saturday, Matt D doubted The Dave's Word that he could or would
ever make it fast. So in the wee hours of Sunday, January 13, 1991, I
wrote some fast output routines. As I recall it took 4 to 6 hours. It
wound up being 400 lines of assembly (15-20% comments). Some of the time
was fiddling with the rest of Nifty List to fit the new routines in--finding
leftover calls to the Text Tools, etc.
There's no special trick. The bulk of the speed comes from scrolling
the screen quickly. Once you assume you're on a GS and only worry about
the 80x24 text screen, it's pretty easy.
I don't recommend everybody go out and write directly to the screen. But
for special-purpose tools like GSBug and Nifty List, it makes sense.
Specifically, I do *not* agree with the FTA philosophy of re-inventing
the wheel as a matter of principle. Life is too short not to leverage
off other people's work, or to do work which other people can build on.
I would prefer to see people build *better* tools for their own use
and to give or sell to others, rather than avoiding tools.
--
David A. Lyons, Apple Computer, Inc. | DAL Systems
Apple II System Software Engineer | P.O. Box 875
Internet:dlyons@apple.com | Cupertino, CA 95015-0875
My opinions are my own, not Apple's.