Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!cica!ctrsol!uakari!indri!dogie.macc.wisc.edu!vms.macc.wisc.edu From: yahnke@vms.macc.wisc.edu (Ross Yahnke, MACC) Newsgroups: comp.sys.mac.programmer Subject: Re: Config File Resource Blues Message-ID: <2013@dogie.macc.wisc.edu> Date: 10 Jul 89 02:23:13 GMT Sender: news@dogie.macc.wisc.edu Organization: University of Wisconsin Academic Computing Center Lines: 25 }I want to point out that this is a very ineficient way of doing }things. There's no need to remove and re-add the resource; you can }just change it and call ChangedResource. This would reduce the memory }operations involved in removing and re-adding (which can be quite }significant, leading the entire resource map to be resized in RAM) and }reduce the size and complexity of your routine. Your whole update }routine would be just: } } aHdl = GetResource('DATA', 128); } /* At this point I init aHdl w/the data structure } * that I've maintained, in preparation for } * writing it back out. } */ } ChangedResource(aHdl); } WriteResource(aHdl); /* optional */ This looks good. My only statement is that my DATA will more than likely change size between reading it and writing it. In which case I would have to do a SetHandleSize, correct? //////////////////////////////////////////////////////////// Internet: yahnke@macc.wisc.edu Phonenet: 608.262.8626 Mailnet: 1210 W. Dayton St., Madison WI, 53706 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\