tip Posted April 15, 2009 Posted April 15, 2009 (edited) Hi all, I'm a newbie and if this is a silly question please be patient with me ... I was wondering how the buffer effects softwares... For ex. when we try to calculate MD5 hash of a large file we divide it to smaller pieces during FileRead. for $i to ceiling($Filesize/0x20000) FileRead($OpenedFilesHandle,0x20000) next I'm not sure that "0x20000" can be called "Buffer" though I was wondering what effect it has on the script. I tried to set it a higher value like 0x80000 but I couldn't noticed any difference while it was running. So if you can help me figuring it out I'd be very content. Thanks in advance Edited April 15, 2009 by tip [center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center]
tip Posted April 16, 2009 Author Posted April 16, 2009 No one?? [center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center]
Authenticity Posted April 16, 2009 Posted April 16, 2009 (edited) Read the CreateFile API function description and remarks you'll have a clue what buffering is good for and in which cases. Generally, if you're going to parse (copy) big files, more than a few mbs, you'll see a performance issues and maybe allocation failures if the file is above a few tens of mbs. It'll undermine your program stability as well as the system available memory. If you're going to develop things as "minimum required 512 MB RAM and recommended 2 GB RAM" you'll need to adopt buffering and determine when to use it, and when buffering is not required. Edited April 16, 2009 by Authenticity
tip Posted April 17, 2009 Author Posted April 17, 2009 So that "0x20000" has nothing to do with "buffer" right? You are saying buffer is something completely different.. Because when I calculate MD5 Hash with that line it consumes only 6MB of ram... [center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now