dlyons@Apple.COM (David Lyons) (06/05/89)
In article <8906040416.AA09109@crash.cts.com> pnet01!pro-avalon!pro-nebulous!jim@nosc.mil writes: >Network Comment: to #2004 by pnet01!crash!purdue.edu!haven!umbc3!umbc5.umbc.edu!cs472226 > >Ok several of you folks have pointed out that there are da's available to load >da's. That is all fine and dandy but it takes all of the convience out of it. > I am thinking more along the lines of something that will still list the da >in the Apple menu, but will only load them into memory when you select them. [...] I still say a good solution is to convince NDA authors that they should use more dynamic segments. The system calls InitialLoad on each NDA file during boot; this doesn't necessarily load the entire NDA into memory--it just loads the static segments. If somebody wants a pretty interesting project, I suppose you could write a permanent init file for the SYSTEM.SETUP directory that allocated memory for some "fake" NDAs containing just a name & addresses of long jumps to some code that would actually load the NDA, and then call InstallNDA to add the fake NDAs to the system's DA list. When one of the fake NDAs was actually called, the code in the init file would load the thing from disk (with InitialLoad) and patch the 4 long jumps to point to the same addresses as the ones actually in the loaded image of the NDA. I believe this could be done completely by the rules, except that any NDA handled this way couldn't have its INIT routine called at boot time (it could be called when the NDA was first loaded, though). The NDAs to be handled this way could be stored in a different directory (maybe *:SYSTEM:MORE.ACCS or something). The init would need some way to get a reasonable name to use for the fake NDA. The simplest thing would be to use the filename, but it would look pretty ugly. Getting the name out of the file in a reliable way means calling InitialLoad on each file (and then doing a DisposeAll on the resulting ID?). That would mean no time would be saved during boot (but it might be okay if memory space is really the concern.) Another approach would be to do something similar to what the Font Manager does with FONT.LISTS--keep a pre-built list of the things & know when to rebuild it automatically, without opening any of the files (just check for changes in name or last-mod date for all the files in the directory). Note that I've glossed over some of the details that have occured to me and all of the ones that haven't. It's just an idea. >Jim --Dave Lyons, Apple Computer, Inc. | DAL Systems AppleLink--Apple Edition: DAVE.LYONS | P.O. Box 875 AppleLink--Personal Edition: Dave Lyons | Cupertino, CA 95015-0875 GEnie: D.LYONS2 or DAVE.LYONS CompuServe: 72177,3233 Internet/BITNET: dlyons@apple.com UUCP: ...!ames!apple!dlyons My opinions are my own, not Apple's.