On Thursday, Jun 26, 2003, at 08:36 US/Pacific, Pacella, Michael wrote: > Another CFC was created to access the database, performing > functionality > such as "search". Search would query the DB, and then step thru the > results, > creating Campus CFC objects for EACH campus returned. The end result > of the > function would be a Structure whose Keys were the CampusCode and whose > Value > were the actual, aforementioned Campus CFC object.
Reading a database and converting every row returned into an object is not likely to perform particularly well in any OO language. Object instantiation can be an expensive operation, depending on how you've coded your objects. Mapping relational <-> OO like this is often a shock to folks who've never worked in OO, particularly if they perform a fairly naive (read: straightforward) mapping. There are ways to design encapsulation such that it doesn't create a huge performance overhead. A lot depends on how you are trying to use the objects. Blake Stone gave a great talk at JavaOne about how to write faster code. He was talking about Java but some of his points relate to CFMX just as much, especially the one about deferring operations and performing lazy initialization. See some notes on my blog: http://www.corfield.org/ index.php?fuseaction=blog.archive&month=2003_06#000398 Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

