From: <Web...@St...> - 2006-03-17 11:32:47
|
On Mon, 13 Mar 2006, Keats Kirsch wrote: | Endre St=F8lsvik wrote: |=20 | > On Sun, 12 Mar 2006, Alex Twisleton-Wykeham-Fiennes wrote: | >=20 | > | All, | > | | more performance tweaks, this one to the org.webmacro.engine.Vari= able | > class. | >=20 | > Excellent performance tuneup you're into, Alex! | >=20 | > | - made the getVariableName() method check to see if _vname has been= | | > initialised, and if not then build the name before returning it. Thi= s is | > now | synchronized as it changes the state of the object. | >=20 | > So? | >=20 | > Is it shared across threads? | > =20 | The answer is yes, as we were so rudely reminded when the dynamic #incl= ude bug | was discovered recently. Compiled template instances are cached and ma= y be | shared by multiple threads. That templates are shared, is kinda rather obvious - they are cached. Tha= t=20 they have som much _modifiable_ internal state isn't necessarily that=20 obvious to me. Endre. |