File append
LiangTyan Fui
mlist at afteroffice.com
Sun Aug 17 22:53:00 EDT 2003
(I was writing the following for bug report to runrev.com, unfortunately I
am getting a lot of broken links on their bug reporting system, pointing me
no where, so here I post it)
Here is the code in question:
on fileAppend thefile,thedata
open file thefile for binary append
write thedata to file thefile
close file thefile
end fileAppend
But to our surprised MetaCard actually re-write the ENTIRE file from
beginning and appended thedata after it, instead of a direct append.
This function works very much the same like:
put thedata after url ("binfile:"& thefile)
While this has very little effects on small files, it has great impacts on
dealing with larger files (more than 5 MB). We can actually see the files
dancing from 0 bytes to the final size every time when we append something
onto it.
We have tried change to the following, no luck.
on fileAppend thefile,thedata
open file thefile for binary update
write thedata to file thefile at eof
close file thefile
end fileAppend
MetaCard 2.4.3
The platform: Redhat Linux 8.0, Pentium 166, RAM 128.
--
More information about the metacard
mailing list