Posted in ColdFusion | Posted on 02-05-2010 | 1,837 views
There are some really good blog entries out there on ColdFusion 9 and optimization (I suggest reading everything at Rupesh's blog). As a developer, you have multiple options for how your entities are configured, and how related data is loaded. I'm still coming to grips with those options and learning how to best use them. But here is my question. Are there tools out there that can monitor your ORM usage and report back suggestions for optimization? As an example, consider a Department object that has many Employees. You may decide to make that relationship lazy="extra" since you figure you will almost never need to get employees from a department. But imagine now it's three years down the road - your front end code has changed - and now you are almost always requesting that data. It would make sense to change that relationship (and maybe change fetch to select as well) - but how would you know that? Is there some tool out there that can notice how you are using your entities and then provide some guidance? Certainly you can log the SQL, but it may not be simple to go from that logged SQL to your business logic.
Are there any tools/suggestions/etc in this area?


1) Determine most used use cases. Pre-launch, I guess. Post-launch, I look at stats.
2) Script those cases via MXUnit.
3) Run those tests via JMeter (free load testing tool).
4) Use JMeter to figure out which of the most used use cases is also running slowly.
5) Find the most damaging bottleneck - not necessarily ORM! - and remove it.
I then wash / rinse repeat. Some may call it too "reactive," but every time I've proactively optimized I end up overoptimizing myself into a world of hurt. Instead of optimizing everything, I try to cyclicly correlate what's not optimal with what's actually affecting people, using that to prioritize meaningful optimizations.
Aside from lazy-loading, what other optimizations can be made with ORM?
Please pardon my noob questions... I'm still learning ORM for the first time :)
Looks like Adobe is letting Third Parties invent this.
[Add Comment] [Subscribe to Comments]