[Advanced-java] Memory consumption & performance

Marco Ferretti marco.ferretti at gmail.com
Mon Apr 3 09:14:28 PDT 2006


Hi all.
I am i the web scenario : there is a client that wants to upload one or more 
files and I _have_ to record them in a database ( the real file, not the 
position and write the file somewhere in the filesystem ) . I am using 
Jakarta commons.fileupload libs to get the data from the client; a servlet , 
then, creates an SQL string using a StringBuffer. Now, since the client can 
upload more than one file at the time I was wondering, in a production state, 
wether of  using StringBuffer.delete() or simply a new StringBuffer is the 
best approach towards memory consumption & performance ... or if there's a 
better way to do it .

I don't think that there will be much difference between using statements or 
prepared statements ... am I wrong ?

TIA

Marco

-- 
You will soon meet a person who will play an important role in your life.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /lists/advanced-java/attachments/20060403/d4b15cf8/attachment.bin


More information about the Advanced-java mailing list