commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <mart...@apache.org>
Subject Re: reusing FileUpload objects in the servlet
Date Fri, 05 Jan 2007 18:34:13 GMT
On 1/4/07, Anthony Oganesian <aoganesi@gmail.com> wrote:
>
> Hi,
> I am trying to optimize my servlet which uses FileUload for a heavy
> load and would greatly appreciate any suggestions. Specifically, I
> wonder if it is possible (advisable) to instantiate some of the
> FileUload objects as static (e.g. DiskFileItemFactory)


If you are just using FileUpload "out of the box" (i.e. without adding your
own custom classes), I wouldn't bother trying to cache instances of the
FileUpload classes. The instantiation cost is insignificant. You'd be better
off spending your time optimising the threshold between memory and disk
storage for your particular scenario.

--
Martin Cooper


Thanks a lot in advance,
> Tony.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message