Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!dayton!viper!john From: john@viper.UUCP (John Stanley) Newsgroups: comp.sys.atari.st Subject: Re: PD C_compiler & Csh Message-ID: <859@viper.UUCP> Date: Fri, 17-Apr-87 14:10:08 EST Article-I.D.: viper.859 Posted: Fri Apr 17 14:10:08 1987 Date-Received: Sun, 19-Apr-87 13:07:39 EST References: <387@sbcs.UUCP> <1935@ihuxy.ATT.COM> Reply-To: john@viper.UUCP (John Stanley) Organization: DynaSoft Systems Lines: 48 In article <1935@ihuxy.ATT.COM> nowlin@ihuxy.ATT.COM (Jerry Nowlin) writes: >In article <387@sbcs.UUCP>, pmt@sbcs.UUCP (Phil Tromovitch) writes: >> >> Now the bad part. The cp command is very slow. Doing a rm *.* always >> generate an error message saying "Can't remove .", and it quits. No >> option for wide directory listing. >> > >I'm taking suggestions for the cp problem (it's also a mv problem when >files aren't on the same drive). I've tried lots of things to make it >faster but nothing I know about can make it as fast as a desktop drag copy. >I just bought Megamax C, mainly because it's supposed to do disk I/O faster >and generate smaller code. I'm currently working on compiling ash with >Megamax and while I'm at it I'll try to fix any of the little problems and >nagging things that are bugging you. I also plan to make the memory >allocation dynamic so ash runs leaner. If I can do it without too much >rewriting I'm going to implement I/O redirection for the built-in commands >while I'm at it. > >PLEASE send me any suggestions you have. I'm planning to post the thing to >the net with an actual document instead of the HELP file in a few weeks. I >have to make sure the port to Megamax is solid first. Just for >information, ash was the shell used to port the Icon Programming Language >to the ST so it has proved useful. Thanks. > The slowest way to copy a file is character by character... Speed increases as the block size increases. You'll also get significantly faster disk i/o if you use the Fopen/Fread/Fcreate functions instead of the fopen/fread/fwrite. A friend and I wrote a shell which we installed in the version of Emacs we use, and later extracted it for use as a seperate shell. We Malloc (not malloc) the largest chunk of memory we can find, then Fread and Fwrite in monster sized chunks. It copys so fast it make the desktop look like it's transfering a -bit- at a time... :) [ Shell Writers, Please Read ---> One important thing I'd like to see -all- shell writers do is to get the old date and time properly transfered to the new file. It's not very complicated (takes about 5 lines of C) and makes the copy function -much- more useful... (Ever try using MAKE in a system where copying your files flakes out the date and time info? It doesn't work...! :( --- John Stanley (john@viper.UUCP) Software Consultant - DynaSoft Systems UUCP: ...{amdahl,ihnp4,rutgers}!{meccts,dayton}!viper!john