Upload | No component two days ago wrote the server-side download files to the client example, a friend sent a message to say want to discuss the efficiency of uploading files. Here is a personal point of view, friends can use msn:johntan2212@hotmail.com
or visit http://www.szchip.com to get in touch with me. Thank you
Using Formsize=request.totalbytes
Formdata=request.binaryread (Formsize)
Get the contents of the file if you are anxious to get the character form of the file while using St=f_bin2str (Formdata)
Then the St file processing, the efficiency is very low. Analysis of some foreign business components, they are used while reading the file side of the processing method, so the processing efficiency is very high. Mostly in the loop
While Startline<stsize
Wend
, the binary row is extracted first, and then the character is converted and processed.
LINELENGTH=INSTRB (STARTLINE,FORMDATA,CLSTR)-startline
LINESTRB=MIDB (Formdata,startline,linelength)
The changes are small, but the efficiency is doubled.
Do the experiment, the same file, read the load processing speed. It took 15 minutes, while the edge-reading process took only a few seconds.
The efficiency difference is also apparent.
This only means that I think of the method, if the shrimp have a better way, welcome to enlighten.