On Tue, May 16, 2006 at 11:54:58AM -0700, Bryan R Harris wrote: > > I figured the OS would load the file in blocks, but I thought the blocks > might only be 12k or something like that. > > I am surprised at the levels of concern over memory reading in <20 MB files. > Don't most people have 1+ GB now? I've got 2... I'm just surprised that > using at most 1% of my total ram would be a concern.
If you're absolutely certain, with no hesitations or equivocations, that the program will never ever be used by anyone for more than one file at a time, with file sizes no bigger than 20MB, on systems with more than a gig of RAM, and that such systems will never ever under any circumstances be under very heavy load, then sure, feel free to ignore memory efficiencies like that. If, on the other hand, there's even the glimmer of a doubt that you might one day violate one of the above restrictions, you'll almost certainly suddenly find your little program being run three hundred times simultaneously on 1.5GB files on a system with 128MB of RAM while it is being accessed by seventy users who are all doing video file format conversions, or something equally inconvenient. Scalability is good. Don't automatically assume the best case. Plan ah Whoops. -- Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ] "The measure on a man's real character is what he would do if he knew he would never be found out." - Thomas McCauley -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>