On 5/17/06, Brian Kotek <[EMAIL PROTECTED]> wrote: > CF already has an idiom for dealing with recordsets: the query result set.
Which is itself a design pattern :) > There is significant overhead of building an array of CFC instances for all > the matching records. In just about every context I've ever encountered, > this is overkill. I would recommend simply returning the query result set. > Indeed, this is how Reactor, ObjectBreeze, and the other ORM frameworks and > code generators handle gateway objects. As do many of those in other languages (eg ActiveRecord in Rails, Hibernate). Frankly, you can overflow the Java heap if you create too many instances of an object in a collection that could be replaced with a single large resultset object. I mean a LOT of instances though -- I've seen 80k rows come back from a search that were each turned into individual object instances. Ouch! That resulted in an overflow unless the (tomcat in this case) JVM Heap was over 256MB ;) -- John Paul Ashenfelter CTO/Transitionpoint (blog) http://www.ashenfelter.com (email) [EMAIL PROTECTED] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240839 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

