[snip]
Simon Nash wrote:
Thanks for getting these performance numbers.  They confirm that
an optimization for this case is needed.  The question is whether
the current patch is the right fix, and also whether now is the
right time to apply it.

Consider the following case, which could also be a common wiring
pattern.  A and B are componments with STATELESS implementation
scopes.  A has a reference to a service in B, and B has a
reference to a service in A (both normal forward references,
not callbacks).

When an instance of A is created, with the optimization, the
stateless scope container will create a new instance of B.
Creating the B instance will create another instance of A, which
will create another B instance and so on.... until we run out
of stack, heap or both.

I just tested that scenario:
- getting a StackOverflow with the optimization patch
- good news is that everything works fine with our current proxy approach :)


This is just one example of a problem with the current code.
Sebastien has found a few issues with it as well, as well as
areas where we don't have good enough test coverage to pick up
all the problems that this change could create.  There's probably
no test for my scenario above either.  How many more issues are
there as well as those that have come up so far?

I think we would be taking too much of a risk if we do this now so
close to 1.0.  It's a small change in terms of lines of code but
it raises big issues in terms of design.  It needs more time for
careful consideration and analysis of all the scenarios.

  Simon

How about these two options?

[A] A well identified JIRA is created for that patch, and people who want to experiment with performance optimization can apply it.

(exclusive) or

[B] The optimization is in the code but disabled by default. People can activate it by setting an experimental system property to true.

Since we're so close to 1.0 and given the StackOverflow I just got with the patch, I'm leaning towards [A].

Thoughts?

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to