RE: [coldbox:16804] coldbox BE criteriabuilder

How long did the non-ORM version take, or did you ever have a non-ORM version of it?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

yes the optimized non-orm version took less than a minute as well. I switched to ORM b/c I love the populateXXX functions and since I’m taking data from a CSV file and parse them into a structure, its really easy to use the populate and hit save.

When I switched to ORM I reduced the lines of code by 30% b/c of Luis’ awesome sauce in CB. Sadly until I figured out how to optimize ORM, it was pretty much a pain in my butt…however the last result of 52 seconds proves its possible to get similar results with ORM as with QoQ. Just requires a slightly different approach.

I’m going to play with Railo’s Closures and see if it will get any faster. I suspect I can do an arrayFind closure and it might be even faster.

I think this could be either a good candidate for a Blog Post or Meeting…

Agreed. I’m also new to ORM, and optimization is a topic I’m just starting to scratch the surface on. Would love to read/see/listen to someone who’s figured out some good practices and can distill them within the CB context.

Agreed. While it seems you’re taking advantage of some (many?) of ColdBox’s built-in ORM features, the principles are universal. For that reason I think a post/talk to a more general CFML/ORM audience would be fantastic. I’m betting the Railo guys would be more than happy to host a talk that showed off some of the Railo features you’re using, too. :wink:

Or, maybe we got lucky and you proposed a talk for cf.Objective() on the topic?! :smiley: