Thanks Bud, Dave and Jeff.
I took Jeffs solution and it worked great.
Uwe
----- Original Message -----
From: "Dave Watts" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, September 10, 2000 9:03 PM
Subject: RE: cffile and cfloop ?
> > This is much more efficient, Bud. However, it depends on
> > how long the cumulative records are.
> >
> > I haven't tested this on 4.5+, but under 4.01, if I tried to
> > write a variable to disk that was over about 32k, the CF server
> > would spike at 100% CPU and lock up completely, requiring a reboot.
>
> Well, as usual I had to test it. And as usual, I'm wrong. LOL
>
> I ran it my way on a query with 3915 records. It created a file 179
> KB. It didn't lock up, and that's on Win98 with 4.01 and a whopping
> 64 MB RAM. But, it did take 4 minutes. Your way took 10 seconds. LOL
> So, I think it's safe to say that your way is more efficient AND
> safer. :)
>
> Learn something new every day here. I would think that one large
> write would be quicker than 4,000 small ones. Certainly not 2,400%
> slower. :)
Don't be too hasty with your conclusions!
There are two things which will affect the efficiency of your file writes,
as far as I can tell. The first is how many times you open and close the
file, and the second is how much data needs to be buffered in memory before
being written to file.
You might find on a server that's better prepared to handle operations in
memory, your method is much more efficient. For example, if you do it on an
NT server that has physical memory to spare, you may be better off with your
method. I've found this to be the case for some very large writes I've had
to do in the past. On your 64 Mb Win98 machine, it may have had to use
virtual memory to complete the operation, which of course requires reading
to and writing from the disk.
The moral of this story, if there is one, is that there are lots of
variables that enter into a "which is faster" question - often so many that
you can't arrive at a general answer.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.