3 Replies Latest reply on Apr 2, 2004 10:37 AM by rythos

    cflow implemented with ThreadLocal

    Bill Burke Master

      In attending AOSD, I found that others implement CFLOW differently than I have. I use new Throwable().getStackTrace and parse the stack. This is slow as balls. The way others use it is that they increment a ThreadLocal counter at the execution point of a element in the cflow expression.

      The debate is, yes, the ThreadLocal approach is a much much much faster implementation of cflow, but if cflow check is a rare occurance, then you have slowed down execution joinpoints signficantly.

      I guess the answer is to do either or and through configuration turn on/off this optimization.