Best Practices for Interceptors

Hey All,

We are considering heavy use of interceptors in our application for
any form of communication between functional areas via
announceInterception(). We currently have about 7 that are broken out
by functional group and are considering adding many more. We were
recently investigating some performance issues with the framework and
during some profiling efforts it appears that there is quite a bit of
time associated with the processing of the various interceptors. My
question to the group is has anyone made extensive use of
interceptors? Has anyone run 10, 20, 30, or more? Is there a
significant overhead with having that many running? Is this the best
approach for loose coupling?

I would say this really depends on what the interceptors are doing.

I have 7 or 8 running at various times and experience no problems.

Sana can probably give you a technical answer.

Hi Dirk,

One of our Application have 13 Interceptors but no any performance
issue.

Now Lets have a look coldbox interceptors which are heavily used for
SES, Environment, Autowire.
Coldbox 3.0 been reorganised into packages and more highly tuned for
performance.

To be honest its totally depend on your handling Interceptors.
If any database aspects (which takes long time to process) so in this
case could be issue of performance.

Please read this guide, we have comprehensively covered best practices
for building Interceptor.
http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/cbInterceptorsGuide

I would suggest that you should review your interceptors and try to
pin point parts which are causing performance issue.

Thanks