At 07:00 AM 12/7/01 -0500, Geoffrey Talvola wrote:
>Caching it in the instance will work, but that means you'll be computing the
>same thing once per copy of the servlet -- if you have 10 threads, you'll be
>computing the same thing up to 10 times.  It's more efficient to store the
>data in either the class, or as a global variable.  For example, here's how
>you can store it in the class (untested, but I've used code like this before):

I added this to the Wiki at 
http://webware.colorstudy.net/twiki/bin/view/Webware/ComputeOnceThenCache .


--

- Geoff Talvola
   [EMAIL PROTECTED]

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to