appending to a file

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

appending to a file

Jon-3
During the last week, someone asserted that no matter how one coded an
append to a file in Rev, it required loading the entire file into memory.

This may be true in Rev, but it is not true in Windows (and, I would
guess, in all other OS's).  In Windows, one can open a file, seek to the
end, and write.  The OS may have to bring a little of the start of the
file into memory (at the open) and a little of the end of the file into
memory (at the seek), but for a large file, this may be much faster than
reading the whole thing into memory, appending in memory, and writing
the whole thing out again.

It may well be that the way that the Rev engine is coded takes advantage
of this approach: I am not sure about that.

:)

Jon
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: appending to a file

MisterX
Hi Jon

http://monsieurx.com/modules.php?name=Downloads&d_op=viewdownload&cid=11

look for SimpleFilePreview

This little demo shows you all the ropes for file action in Rev...

cheers
Xavier

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Jon
> Sent: Sunday, August 28, 2005 16:02
> To: Revolution List
> Subject: appending to a file
>
> During the last week, someone asserted that no matter how one
> coded an append to a file in Rev, it required loading the
> entire file into memory.
>
> This may be true in Rev, but it is not true in Windows (and,
> I would guess, in all other OS's).  In Windows, one can open
> a file, seek to the end, and write.  The OS may have to bring
> a little of the start of the file into memory (at the open)
> and a little of the end of the file into memory (at the
> seek), but for a large file, this may be much faster than
> reading the whole thing into memory, appending in memory, and
> writing the whole thing out again.
>
> It may well be that the way that the Rev engine is coded
> takes advantage of this approach: I am not sure about that.
>
> :)
>
> Jon
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution