Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-09 Thread Tom Chiverton
On Monday 08 Oct 2007, [EMAIL PROTECTED] wrote: No, it's each time the Proxy object is created (the proxy is written to disk as a temp file, then instantiated, and finally the temp file is deleted). Which is only ever once in the lifetime of the beanFactory, right ? -- Tom Chiverton Helping

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-09 Thread Brian Kotek
Not if the object is a per-request object (a non-singleton). A non-singleton CFC with AOP applied to it will have a temp CFC written every time you instantiate that CFC (totally independent of the beanFactory). Again, it does this to make sure you don't end up with a ton of temp CFCs on disk. I

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-09 Thread Tom Chiverton
On Tuesday 09 Oct 2007, [EMAIL PROTECTED] wrote: Not if the object is a per-request object (a non-singleton). A non-singleton CFC with AOP applied to it will have a temp CFC written every time you instantiate that CFC (totally independent of the beanFactory). Ahh. You get a non-singleton by

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-09 Thread Brian Kotek
Exactly, that was what the original question was asking about (using AOP with non singletons aka transient objects). On 10/9/07, Tom Chiverton [EMAIL PROTECTED] wrote: On Tuesday 09 Oct 2007, [EMAIL PROTECTED] wrote: Not if the object is a per-request object (a non-singleton). A

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-08 Thread Tom Chiverton
On Friday 05 Oct 2007, [EMAIL PROTECTED] wrote: OK I was wrong on this because I was actually missing a crucial detail: the proxy factory deletes the temp CFC as soon as it is instantiated. This is so you don't end up with a ton of generated CFCs on the disk. So it would (in fact, it has to)

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-08 Thread Brian Kotek
No, it's each time the Proxy object is created (the proxy is written to disk as a temp file, then instantiated, and finally the temp file is deleted). On 10/8/07, Tom Chiverton [EMAIL PROTECTED] wrote: On Friday 05 Oct 2007, [EMAIL PROTECTED] wrote: OK I was wrong on this because I was

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-08 Thread Brian Kotek
Which again shows why AOP is targeted at singletons not transient objects. On 10/8/07, Brian Kotek [EMAIL PROTECTED] wrote: No, it's each time the Proxy object is created (the proxy is written to disk as a temp file, then instantiated, and finally the temp file is deleted). On 10/8/07, Tom

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Tom Chiverton
On Friday 05 Oct 2007, [EMAIL PROTECTED] wrote: Of course, as you point out, there are already some inherent performance issues with using CS, regardless of AOP (and really CFC instantiation in general). This is basically fixed in CF8, compaired to CF7. -- Tom Chiverton Helping to

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Brian Kotek
True CF8 object creation is way, way faster (hooray!). But even on CF8, creating per-request objects with ColdSpring is always going to be a tiny bit slower than creating them with your own factory, due to ColdSpring resolving the dependencies. As I mentioned, the overhead is minimal, and unless

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Barney Boisvert
If I have a dragster that runs the quarter mile in 10 seconds (really slow), and I improve it to 7 seconds (a 30% decrease), it's still not competitive. I'll grant you that CF8's CFC instantiation is much faster than CF7's, but it's still far from sufficiently performant for a lot of scenarios.

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Brian Kotek
Just curious Barney, have you tested this? The numbers indicate that CF8 is 23 TIMES faster than CF7 creating CFC instances. That is a pretty gigantic increase. It seems to me that unless you're creating huge numbers (thousands+) of instances, the option to create true arrays of objects (instead

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread henry ho
creating and writing the dynamic CFC should be a one-shot deal I really hope so.. This is what I'm not sure of. Because it seems like in order to generate a dynamically generated function, it requires using CFFILE to write the .cfm/.cfc, and if this is required every time, it is going to be

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Brian Kotek
OK I was wrong on this because I was actually missing a crucial detail: the proxy factory deletes the temp CFC as soon as it is instantiated. This is so you don't end up with a ton of generated CFCs on the disk. So it would (in fact, it has to) regenerate the file to disk each time. Another reason

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Brian Kotek
All it does is read the metadata for the component being proxied and then write out a CFC file that has those methods and arguments, but adds in calls to whatever AOP advices you have specified. So I don't see any reason why it would keep writing it out to disk each times since it would never

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Sean Corfield
On 10/5/07, Brian Kotek [EMAIL PROTECTED] wrote: True CF8 object creation is way, way faster (hooray!). But even on CF8, creating per-request objects with ColdSpring is always going to be a tiny bit slower than creating them with your own factory, due to ColdSpring resolving the dependencies.

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Barney Boisvert
What does 23 times faster mean? That per-instantiation, it takes 1/23rd of the time on CF8 that it did on CF7 (i.e. a 95% reduction)? If so, that's a great improvement, but it's nearly devoid of meaning here. What if CF took 1 second per instance on CF7? Then CF8 would be expected to take 40ms

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Jo�o_Fernandes
Barney, are you using getters / setters when creating your CFCs in your fills or using THIS scope? -- João Fernandes www.onflexwithcf.org www.riapt.org ~| Get involved in the latest ColdFusion discussions, product development

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Brian Kotek
Wow, never realized the ColdSpring overhead was quite that high. Now I see why it's really meant for singletons! On 10/5/07, Sean Corfield [EMAIL PROTECTED] wrote: On 10/5/07, Brian Kotek [EMAIL PROTECTED] wrote: True CF8 object creation is way, way faster (hooray!). But even on CF8,

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Brian Kotek
Yeah, of course everything is variable depending on the complexity of the CFC, etc. I've run some simple loop-based tests, which I know aren't very useful but it's a quick and easy way to get a probable idea of what's going on. I can instantiate 10,000 fairly simple beans in under 10,000 ms, which

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Barney Boisvert
I didn't actually built it, one of the other devs did. I think it was get/set - whatever the Eclipse wizard creates. I just got involved when performance was in the toilet, and we opted for structs with __type__. cheers, barneyb On 10/5/07, João_Fernandes [EMAIL PROTECTED] wrote: Barney, are

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-05 Thread Jo�o_Fernandes
Barney, There is a third option that is to use THIS scope on the bean CFCs instead of using getters/setters. Then you'll have to change the destination configuration and set use-accessors = false. This isn't as fast as using the struct + [__type__] solution but is pretty faster than using with

Coldspring AOP on Transient Business Object, bad combo?

2007-10-04 Thread henry ho
Hi all, I understand that Coldspring is not designed for Transient BO, but I need to do some AOP on mine to control access privilege. Looking through some of the source code, seems like doing AOP is slow enough because of the IO required to write the actual proxy cfc. Together with the

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-04 Thread Barney Boisvert
Proxy generation should happen once per class, not once per instance, but I'm not 100% sure of that. Obviously instantiation is per instance, but actually creating and writing the dynamic CFC should be a one-shot deal. As such, the performance overhead shouldn't significantly more with CS AOP

Re: Coldspring AOP on Transient Business Object, bad combo?

2007-10-04 Thread Brian Kotek
I also believe the actual proxy CFC code should only be generated once. However, since I haven't used AOP with a non-Singleton ColdSpring-managed object, I am not 100% sure. Are you sure what you want to do can't be handled with a Singleton using AOP (that internally may interact with a