@Brian, I certainly agree that performance is usually not a good primary consideration, I get the benefits of an explicit API and I agree that with CF9, most of this will be moot. But I'm wondering whether creation of 10,000 objects per request would really be a matter of milliseconds? Guess I need to go run some tests and find out!
Peter On Feb 1, 2009, at 8:21 PM, Brian Kotek wrote: > At this point I know we're veering into theoretical territory, and I > still would say that the difference wouldn't be extreme. But I'd > argue that parsing the metadata for 10,000 cfproperty declarations > to determine how to handle the method calls at runtime will still be > slower, even given the fact that the metadata itself is cached per > class instance. > > As Sean points out, counting milliseconds at this level is probably > pointless given the other far more likely bottlenecks in a CF > application. And speed is certainly not my reason for prefering > explicit methods (as everyone probably saw heh). > > > On Sun, Feb 1, 2009 at 2:56 PM, Peter Bell <[email protected]> > wrote: > I've been having troubles posting to the list (mess up my end with > incoming and outgoing servers for different accounts), but I'm not > at all sure this is true. > > Imagine you are returning a collection of users to display on the > page - let's say 100 users. Now let's assume that each user has LOTS > of getters and setters and that you've made a decision to provide > them as a rich user API to hide any implementation details (so you > have a User.getBillingPhone() rather than a > User.getBillingAddress.getPhone()). Lets say there are 50 > properties, which gives us 100 getters and setters. So, with oMM(), > we have to create 100 objects and then use oMM() to access/mutate > properties. Without it, in Adobe ColdFusion we're gonna have to > create 10,000 objects as each method is compiled into its own little > object. I gotta believe that there is at least a chance that the > performance penalty of creating an additional 9,900 objects could in > some circumstances outweigh the extra processing time for the > dynamic evaluation of the getters and setters. > > Best Wishes, > Peter > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
